HP 3000 Manuals

Editing Field Attributes [ HP RPG/XL Utilities-Part 3 SIGEDITOR ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 3 SIGEDITOR

Editing Field Attributes 

To edit field attributes, enter the form name in the field provided on
the edit main menu and press  f3  (EDT FLD ATTRIB.).  The field attribute
keys shown in Figure 2-2 are displayed.
_____________________________________________________________________________________
|                                                                                   |
|       NEXT      PREV     FIRST      SET                  DEFAULT   SEE/SET    EDIT|
|       FIELD     FIELD    FIELD     FIELD                 ATTRIB.   ATTRIB.    MENU|
|                                                                                   |
|                                                                                   |
_____________________________________________________________________________________

          Figure 2-2.  Field Attribute Keys 

The first three keys allow you to move the cursor from field to field.
Pressing  f1  (NEXT FIELD) moves the cursor to the next field on the form
according to line and column numbers.  The next field is found on the
basis of which field begins in the next highest column or row, not on the
basis of the field's assigned sequence numbers.  When the cursor is
positioned in the last field and the  f1  key is pressed, the cursor
moves to the first field.  In contrast, when the cursor is positioned in
the first field and the  f2  (PREV. FIELD) key is pressed, the cursor
moves to the last field.  The  f3  key (FIRST FIELD) moves the cursor to
the first field on the form.

The form is also displayed on the screen, as shown in Figure 2-3.
____________________________________________________
|                                                  |
|     NAME A#########################              |
|     ADDRESS  A###################################|
|     PHONE NO.  A#########                        |
|     SOC. SEC. NO.  A#############                |
____________________________________________________

          Figure 2-3.  Sample Form 

The letter in the first position of the field indicates the data type of
that field.  The possible data types are summarized in Table 2-2.  The
number signs (#) show how far the field extends.

          Table 2-2.  Allowable Field Data Types 

---------------------------------------------------------------------------------------------
|                                             |                                             |
|                   Letter                    |                  Data Type                  |
|                                             |                                             |
---------------------------------------------------------------------------------------------
|                                             |                                             |
|                      A                      |                 alphabetic                  |
|                                             |                                             |
|                      B                      |                alphanumeric                 |
|                                             |                                             |
|                      N                      |                   numeric                   |
|                                             |                                             |
|                      S                      |                   signed                    |
|                                             |                                             |
|                      D                      |                   decimal                   |
|                                             |                                             |
---------------------------------------------------------------------------------------------

From this screen, you can change the attributes of individual fields.
Once the cursor is positioned in the field whose attributes are to be
changed, pressing  f7  (SEE ATTRIB.) displays the current attributes of
that field, as shown in Figure 2-4.
_________________________________________________________________________________________
|                                                                                       |
|                   RPG Screen Interface Attribute Specification                        |
|                                                                                       |
|                Form File:  formfile.group.account             Form:  formname         |
|                                                                                       |
|     ----------------------------------------------------------------------------------|
|                                                                                       |
|     Field Name:       Sequence Number:                                                |
|                                                                                       |
|                                                                                       |
|     Position Cursor: N    Protect Fields: N    High Intense: N    Blink Field: N      |
|                                                                                       |
|                                                                                       |
|     Security Video:  N    Inverse Video: Y     Underline:     N    Output Field: N    |
|                                                                                       |
|                                                                                       |
|     Constant Type (C=constant, M=Message, " " = User Program)      Input Field:  N    |
|                                                                                       |
|        Message Set No:         Message No:                                            |
|                                                                                       |
|     Data Type  (A+Alpha, B=Alphanumeric, D=Decimal, N=Numeric, S=Signed)       B      |
|                                                                                       |
|                                                                                       |
|     Mandatory Enter   N          Mandatory Fill   N        Enable Duplication   N     |
|                                                                                       |
|                                                                                       |
|     Adjust Fill (Z = Zero, B = Blank):            Self Check (T = 10, E = 11)         |
|                                                                                       |
|                                                                                       |
_________________________________________________________________________________________

          Figure 2-4.  The Field Attribute Screen 

As with the form specifications, default values are assigned to the field
attributes when a field is created.  When the field attributes are
displayed, the tab key moves the cursor from one attribute to the next.
To change an attribute position, use the tab key to position the cursor
at the attribute and type the new value.

When you have set the desired attributes, press  f4  to save the new
values.  To return to the default attributes, press  f6 .  When you are
done, press  f8  to return to the edit menu.

Each field attribute is described below.

Field Name 

The Field Name entry contains the name of the field.  A field name can be
up to six characters, beginning with a letter or @, $, or #.  The
remaining characters can be letters, digits, or @, $, or #.


NOTE If you leave the field name blank, SIGEDITOR creates a name for the field. This name consists of the letters FLD followed by a number.
Sequence Number The Sequence Number establishes a relationship between the sequence in which fields appear on the form and the sequence in which the fields are placed in the RPG program input/output (I/O) buffer. When you create a form, fields are sequenced according to line and column number. When the form is edited after the initial design, sequence numbers are assigned to fields according to the order in which they are created, not according to line and column numbers. You can change the order of the fields' placement in the buffer by changing the sequence number of each field. However, when changing the sequence of a form's fields, be aware that previous RPG input and output specifications for that form no longer apply. I/O specifications must reflect the sequence in which fields are placed in the buffer. If you change the sequence numbers of a form's fields without generating new I/O specifications, the data is not stored in the correct buffer locations.
NOTE If you change the sequence numbers of a form's fields, regenerate I/O specifications and recompile the program. (See "Generating I/O Specifications.")
Position Cursor Legal values for this field are Y, N, and 01-99. The Position Cursor attribute positions the cursor at a specific input field when a form is first displayed. If Y (yes) is specified, the cursor appears at the first position in this field, unless another field in the same form has an indicator specified for Position Cursor and the indicator is on. If so, the cursor appears at the first position of the first field whose indicator is on. Specify Y for only one field in a form. A Y in any following field has no effect. If N (no) is specified, the cursor will not appear in this field unless it is the first unprotected field in the form, no other field uses a Y in the Position Cursor field, and no other field has an indicator that is specified for Position Cursor. If more than one field in a form has indicators specified in this entry, and the indicators are on when the form is displayed, the cursor appears in the first field whose indicator is on. Protect Field Legal values for this field are Y, N, and 01-99. If Y is specified, or the field uses an indicator and the indicator is on, the user cannot enter data in the input field (the field is protected). If N is specified, or a field indicator is used and it is off, the user can enter data. High Intense Legal values for this field are Y, N, and 01-99. If Y (yes) is specified, the field is displayed with high intensity. If N (no) is specified, the field is displayed with normal intensity. If an indicator is specified, the field is displayed with high intensity when the indicator is on. Blink Field Legal values for this field are Y, N, and 01-99. If Y (yes) is specified, the field blinks; if N (no) is specified, the field does not blink. If an indicator is specified, the field blinks when the indicator is on. Security Video Legal values for this field are Y, N, and 01-99. If Y (yes) is specified, the field is a nondisplay field. Information stored in the field is not echoed to the screen when the form is displayed or when the user enters information into the field. If N (no) is specified, the information in the field is displayed. If an indicator is specified, the field is a nondisplay field when the indicator is on.
NOTE If security video is specified with high intensity, inverse video, or underline, these attributes are ignored. On a terminal that does not support security video, RSI selects the alternate character set for unprotected input fields.
Inverse Video Legal values for this field are Y, N, and 01-99. If Y (yes) is specified, the characters in the field appear in inverse video. If N (no) is specified, the characters appear in normal video. If an indicator is specified, the field appears in inverse video when the indicator is on. Underline Legal values for this field are Y, N, and 01-99. If Y (yes) is specified, the field is underlined. If N (no) is specified, the field is not underlined. If an indicator is specified, the field appears underlined when the indicator is on. Output Field Legal values for this field are Y, N, and 01-99. If Y (yes) is specified, the field is an output field. An output field is a field in which variable data, constant data, or a message is written to the screen when a form is displayed. If the field is not an input or input/output field, data in that field cannot be changed by a user. An output field is used as follows: * If C is specified in the constant type entry, the field displays the literal specified for this field. * If M is specified in the constant type entry, and the message set number and message number entries are specified, these numbers are used to obtain a message from the merged catalog file, which is then displayed in this field at runtime. If the message number entries are not specified, the message set number and message number entries are taken from the RPG output buffer at runtime and used to obtain the message text from the catalog file. * If the constant type entry is left blank, the field is used to display program data from the output buffer. If N (no) is specified, the field is not an output field and the constant type field is ignored. If an indicator is specified and the constant type entry is M or C, the results are as shown in Table 2-3. If an indicator is specified and it is on, data from the program is displayed. Otherwise, blanks are displayed. Table 2-3. Output Field and Indicators ----------------------------------------------------------------------------------------------- | | | | | | Indicator is turned ON | Indicator is turned OFF | | | | | ----------------------------------------------------------------------------------------------- | | | | | M is the constant type. | The message identified by the | The message identified by the | | | message set number and message | message set number and the | | | number from your program is | message identifier in the | | | displayed. | field is displayed. If the | | | | field is blank, blanks are | | | | displayed. | | | | | ----------------------------------------------------------------------------------------------- | | | | | C is the constant type. | The data from your program | The constant data from the | | | output record area is | forms file is displayed. | | | displayed. | | | | | | ----------------------------------------------------------------------------------------------- | | | | | Override operation is | The data given by your program | The field is unchanged. | | performed. | or the message identified by | | | | your program is displayed. | | | | | | ----------------------------------------------------------------------------------------------- Input Field Legal values for this field are Y and N. If Y (yes) is specified, the field is an input field and may be defined in an input specification in your program. If the field is defined as both an input and an output field, and initially contains a constant, the constant may be overwritten prior to entry of the data. However, the output field must have an indicator on for this to happen. If N (no) is specified, the field is not an input field and cannot accept data entered by a user. Constant Type Legal values for this field are C or blank. If C is specified in the Constant type specification, constant information given in the field is displayed in the output field. If the field is blank, blanks are displayed. If a blank is specified, information from the program output buffer area is displayed. If M is specified in the constant type entry, and the message set number and message number entries are specified, these numbers are used to obtain a message from the merged catalog file, which is then displayed in this field at runtime. If the message number entries are not specified, the message set number and message number entries are taken from the RPG output buffer at runtime and used to obtain the message text from the catalog file. If the message text cannot be obtained using the message I.D. provided, blanks are displayed. Message Set Number Legal values for this field are M or blank. If the constant type specified is M (message), you can specify a message set number representing the message set number within a catalog file that is to be merged (see "Referencing Messages and Merging Catalog Files"). The message will not be merged until you use the merge catalog option in either the main menu or the form utilities menu. Message Number Legal values for this field are M or blank. If the constant type specified is M (message), you can specify a message number representing the message number within a message set of a message catalog file. Data Types Legal values for this field are A, B, D, N, S, and blank. The letter given in this entry indicates the type of data that a user can enter in an input field. Data type is ignored for a field that is output only. The data types are described in Table 2-4. Table 2-4. Data Types --------------------------------------------------------------------------------------------- | | | | Data Type | Description | | | | --------------------------------------------------------------------------------------------- | | | | A | The field can only contain alphabetic data. | | | | --------------------------------------------------------------------------------------------- | | | | B or blank | The field can contain any alphanumeric data. | | | | --------------------------------------------------------------------------------------------- | | | | N | The field can only contain numeric data, commas, periods, plus, or | | | minus signs. The editing characters are stripped when the data is | | | moved to the program buffer, except for the sign, if any. | | | | --------------------------------------------------------------------------------------------- | | | | S | The field can contain only signed numeric data with one position of | | | the field reserved for a sign. The field can be from 2 to 16 | | | characters long. Although the sign for field is displayed on the | | | screen, the buffer space allocated for the field is one character | | | less because the sign is overpunched on the low-order digit. | | | | --------------------------------------------------------------------------------------------- | | | | D | The field can only contain numeric data, commas, periods, plus, or | | | minus signs. The edit characters (comma, period, plus, and minus) | | | are not stripped from this field before it is sent to the user | | | program. This field can be defined as alphanumeric in the RPG | | | program. | | | | --------------------------------------------------------------------------------------------- Examples of numeric and signed numeric data types are shown below. Entered on screen In buffer Numeric: 1234.5 12345 Signed numeric: -1234 123M or 1234- 123M A blank is represented by a . Mandatory Enter Legal values for this field are Y and N. If Y (yes) is specified, the user must enter at least one character in the field before input from the form can be returned to your program. If N (no) is specified, information does not need to be entered in that field. Mandatory Fill Legal values for this field are Y and N. If Y (yes) is specified and the user enters at least one character in the field, the user must enter nonblank characters in all positions in the field. Nonblank characters are any characters entered from the keyboard, except the blank space. Alternatively, the field can be left completely blank. If Y is specified for Mandatory Fill for a signed numeric field, the user must enter a trailing minus sign for the negative fields. If N (no) is specified, the field does not have to be completely filled to be accepted. Enable Duplication Legal values for this field are Y and N. If Y (yes) is specified, the duplicate (Dup) key can be pressed in the field. When the the user presses the Dup key, f8 , the cursor advances to the next field. The position of the cursor and the remainder of the field are filled with the duplicate character value (hexadecimal 1C), which is displayed as a single character. The Dup key does not do actual duplication. The user program must check for the duplicate character and do the duplication. If N (no) is specified, the "dup" key is not valid and causes an error.
NOTE This feature is generally used in data entry programs to simulate the dedicated "Dup" key found on specialized data entry equipment.
Adjust Fill Legal values for this field are Z and B. If Z is specified (indicating right-justified, zero-filled), information entered in the field is right-justified with all unused positions in the field filled with zeros when the field is sent back to your RPG program. If B is specified (indicating right-justified, blank-filled), the information entered in the field is right-justified with all unused positions filled with blanks when the field is sent to your RPG program. If this entry is left blank, right-justified, blank-filled is assumed on input for signed numeric fields. No-adjust, no-fill is assumed for other fields.
NOTE Adjust/fill has no effect if Mandatory Fill is specified for the field.
Self-Check Legal values for this field are found in appendix C. The self-check entry is used only for numeric fields. It is used, for example, to catch errors on entering items such as account numbers. The number is initially created by a user program, using an appropriate algorithm, to compute a check digit, which is then appended to the right-most end of the number. For example, a 6-digit number plus the check digit would become a 7-digit account number. When the number is entered on the screen and self-check is specified, the number is checked, again using an appropriate algorithm, to ensure the number was entered correctly. Hewlett-Packard provides two methods for checking the check digit. If a T is specified in the self-check field, a modulus 10 self-check test is performed. If an E is specified, a modulus 11 check is used. See appendix C for detailed information on these algorithms. If the entry is left blank, no check is made. You must use the same algorithm to generate the check digit as that used to check it in your program. The number may contain leading blanks, embedded blanks, and punctuation. The checking algorithm treats these characters as zeros.


MPE/iX 5.0 Documentation