The SET ATTRIBUTE/COLOR/XHIGHLIGHT statement resets certain terminal display characteristics for panel fields.
This statement has the following format:
SET [{ATTRIBUTE[S]}{attribute ...}] [COLOR {color}]
[{ATTR }{'x ...' }] [ {'y' }]
[XHIGHLIGHT {xhighlight}] [TEMP] ON fld_id [,fld_id]...
[ { 'z' }]
Specifies the general display characteristics of panel fields.
Specifies one or more of the following reserved words:
|
ALPHANUMERIC |
CURSOR |
|
ENSURE RECEIVED |
HIGHLIGHT |
|
INVISIBLE |
LOWLIGHT |
|
NUMERIC |
PROTECTED |
|
SKIP |
UNPROTECTED |
An alphanumeric literal in quotes that consists of the abbreviations of one or more of the above attributes. The abbreviation for each attribute is the first letter of the word or, for ENSURE RECEIVED, the first letter of the first word. For example H for HIGHLIGHT, L for LOWLIGHT, or E for ENSURE RECEIVED. Specify more than one attribute by concatenating the abbreviations as one quoted literal.
You can specify the attributes as follows:
An unprotected field that can accept any characters. U, A, and UA are synonyms.
An unprotected field that can accept only numeric characters (0‑9, decimal point, or comma). N and UN are synonyms.
A protected field that is not skipped. You cannot modify or delete a protected field.
A protected field that the cursor skips over (cannot access). The cursor skips to the next unprotected field if the previous field is defined as PS or has an end‑of‑field mark. PN, PS, and S are synonyms.
See the Creating Panel Definitions Guide for more details on panel field attributes.
Specifies the display color to use for the identified field.
One of the following reserved words:
|
BLUE |
GREEN |
|
NEUTRAL |
PINK |
|
RED |
TURQUOISE |
|
WHITE |
YELLOW |
Represents an alphanumeric literal surrounded by quotes that consists of the initial character of one of the color specifications. That is, 'N' for NEUTRAL, 'B' for BLUE, and so on. You can only specify one color at a time.
Specifies the type of extended highlighting used to display the identified field.
One of the following reserved words:
Note: If you specify UNDERSCORE, the field displays in reverse video.
Represents an alphanumeric literal surrounded by quotes that consists of the initial character of one of the extended highlighting options. For example, 'N' for NONE, 'B' for BLINK, and so on.
Limits the reset of the display characteristics to the next execution of a TRANSMIT statement. After the execution of the TRANSMIT statement, the value goes back to the setting defined for the field in the panel definition. The ENSURE RECEIVED attribute is implicitly temporary. All other characteristics must be explicitly specified as TEMP to limit the duration of the reset.
Specifies the field or fields to receive the new characteristics, where fld‑id is the identifier of the field to receive the characteristics. When C (cursor) is one of the attributes, you can specify only one fld‑id.
When a SET ATTRibute statement executes in a program, storage is allocated containing ALL the attributes for the panel field. If the SET statement only specifies one attribute of a field, all the others assume the CA Ideal SET ATTRibute statement defaults, which are “UAL” and not the values of the original panel or any previous SET ATTRibute statement. If the SET ATTRibute statement has the TEMP option, then at the next TRANSMIT, the attribute storage is deleted and all attributes revert to the original panel field attribute values.
Ordinarily, a panel field is defined with a beginning field character and an end of field character, for example, a plus (+) and a semicolon (;). The end of field character is recognized as the beginning of a new field with an attribute of AUTOSKIP. If the layout of your panel definition includes the following characters, even though it looks like two fields with null characters between and after them, CA Ideal interprets it as four fields. The semicolon (end of field) says “start a new dummy field” with an attribute of AUTOSKIP, and when the user fills the first field, skip to the next field.
+ ; + ;
To define a stopper field (a protected field that is not skipped), do not end the affected field with an end of field symbol. Code a one‑byte field immediately following the affected field. Give this one‑byte field an attribute of PAI.
The panel layout now looks like this:
+ + ; + ;
Overtyping the first field stops the cursor in the one‑byte field and locks the terminal. To get to the next field, use the tab key.
If the ENSURED RECEIVED attribute is turned on in the panel field definition, you cannot turn it off with a SET ATTRIBUTE statement in the program.
You can specify attributes, color, and extended highlighting in any order, but you can specify each one only once.
Examples
The following two statements are equivalent and set FIELD_A to protected and skipped.
SET ATTRIBUTES PROTECTED SKIP ON FIELD_A SET ATTRIBUTES 'PS' ON FIELD_A
The following statement sets field AMOUNT to highlighted, red, and underscored.
SET ATTRIBUTE HIGHLIGHT COLOR 'R' XHIGHLIGHT 'U' ON AMOUNT
The following statement sets fields MSG1 and MSG2 to skipped and highlighted, blue, and blinking.
SET ATTR 'SH' COLOR BLUE XHIGHLIGHT BLINK ON MSG1, MSG2
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|