You define field attribute characters and characteristic in the attribute section. You use the attribute characters to assign certain characteristics to a field. Because there are no default attribute characters, you must define your own. The attribute section starts with the ATTR statement and ends with a BODY statement. A panel definition must have an attribute section.
Sample Attribute Section
The following screen shows the attribute section from the Logo panel definition:
)ATTR _ TYPE(INPUT) MDT(ON) COLOR(WHITE) " TYPE(INPUT) INTENSE(NON) MDT(ON) % TYPE(OUTPUT) INTENSE(LOW) SKIP(ON) COLOR(YELLOW) ¬ TYPE(OUTPUT) INTENSE(HI) SKIP(ON) COLOR(WHITE) ¢ TYPE(OUTPUT) INTENSE(HI) SKIP(ON) COLOR(RED) ! TYPE(OUTPUT) INTENSE(HI) SKIP(ON) COLOR(TURQ) | TYPE(TEXT) SKIP(ON) INTENSE(HI) COLOR(WHITE) + TYPE(TEXT) SKIP(ON) COLOR(yellow) / TYPE(TEXT) SKIP(ON) COLOR(white) INTENSE(HI) HILITE(REVERSE) # TYPE(TEXT) SKIP(ON) COLOR(RED) INTENSE(HI) $ TYPE(TEXT) SKIP(ON) INTENSE(LOW) ~ TYPE(TEXT) SKIP(ON) COLOR(BLUE) INTENSE(LOW)
In the previous screen the following characters are attribute characters:
_ " % ¬ ¢ ! | + / # $ ~
Attribute characters are used in the body section to assign attributes to a field. In the body section, text preceded by an attribute character is displayed with the attributes assigned to the attribute character. The attribute characters do not appear when the panel is displayed on the user's terminal.
In an attribute definition, any single character followed by blanks is an attribute character. Choose attribute characters that do not appear in the displayed text of the panel definition. The text that follows the attribute character defines the characteristics assigned to the attribute character. You can use an attribute character only once in an attribute section. If you use the same character more than once, the product uses the first definition of the character.
The ampersand character (&) cannot be used as an attribute character in a CA TPX panel. The ampersand character is reserved as a variable indicator.
You can put comments anywhere in the attribute section. Comments start with a slash followed by an asterisk (/*) and end with an asterisk followed by a slash (*/). Any data that is not a comment is considered to be part of an attribute definition.
Attribute Keywords and Values
Attributes consist of attribute keywords and attribute values. In the example, TYPE, SKIP, INTENSE, COLOR and MDT are attribute keywords. Attribute values follow keywords and are enclosed in parentheses. The following list describes the keywords and their possible values:
- TYPEThe TYPE attribute indicates whether a field is protected or unprotected and whether it is of fixed or variable length. Protected fields cannot be modified. Unprotected fields can be modified. The TYPE attribute can have one of the following values:
- TEXTA text field is protected, so end users cannot modify data in a text field. Data in a text field is displayed on the panel exactly as it appears in the body of the panel definition. A variable name in a text field is replaced with the variable's current value. You must precede a variable name with an ampersand (&) and follow it with a space or period (.) to indicate that it is a variable name.Text fields are of variable length.
- OUTPUTAn output field is protected, so end users cannot modify data in an output field. An output field may contain only variable names in the panel definition. Unlike variable names in text fields, a variable name in an output field is not preceded by an ampersand.When the panel is displayed, each variable name in the output field is replaced with the variable's current value.Output fields are of fixed length.
- INPUTAn input field is an unprotected field that can be modified by end users. An input field contains only a variable name in the panel definition. Unlike variable names in text fields, a variable name in an input field is not preceded by an ampersand.When the user modifies the field on the displayed panel, the variable contains the value of the user's input.Input fields are of fixed length.
- NUMYou use the NUM (numeric) attribute with TYPE(INPUT) fields. If the NUM attribute has a value of ON, the user can enter only numeric input in the field. The keyboard locks if the user presses any key other than the following: 0 through 9, minus (-), duplicate (DUP), or period (.).
- SKIPThe SKIP attribute indicates whether the cursor automatically bypasses a field when a user tabs through the panel. If the SKIP attribute has a value of ON, the cursor will bypass the field when the user moves through the panel using the TAB key (→). The skip feature can be used only for protected fields (TEXT or OUTPUT).
- INTENSEThe INTENSE (intensity) attribute indicates the intensity or brightness of the field. Possible values are:
- HI, which indicates high intensity.
- LOW, which indicates low intensity.
- NON, which indicates that the field is not displayed.
- COLORThe COLOR attribute indicates the color used to display the field. Colors appear only when the panel is displayed on a 3179, 3279-B, or 3192-type terminal. Possible values include:
When a panel that doesn't have color specified is displayed on a color terminal, a default color is generated for each field on the basis of the field's type and intensity:
- TURQ (turquoise)
- OUTLINEThe OUTLINE attribute specifies one of the available outline features:
- L indicates a line to the left of the field.
- R indicates a line to the right of the field.
- O indicates a line over the field.
- U indicates a line under the field.
- BOX indicates a box around the field.
- HILITEThe HILITE (highlight) attribute indicates the extended highlighting characteristics of the field. Possible values are:
- REVERSE indicates reverse video.
- BLINK indicates a blinking field.
- USCORE indicates an underscored field.When a panel with the HILITE attribute is displayed on a terminal that does not support extended highlighting, the result depends on the following conditions:
- If you have used the INTENSE attribute, the highlighting specification is ignored.
- If you have not used the INTENSE attribute, a field with the HILITE attribute is displayed with high intensity.
- MDTThe MDT (Modified Data Tag) attribute indicates whether the field should have the modified data tag present before being sent to the terminal.
- FORMATThe FORMAT attribute indicates the character format for double-byte character set (DBCS) terminals. Possible values are:
Note:In MIX mode, any double-byte character string must be enclosed by a shift-out (hexadecimal 0E) and a shift-in (hexadecimal 0F).
- EBCDIC indicates EBCDIC characters only.
- DBCS indicates double-byte characters only.
- MIX indicates both double-byte and EBCDIC characters.