$CHKSFLD
Use the $CHKSFLD function to determine whether a display attribute is applied to a screen item for a specified type of screen processing.
Syntax
$CHKSFLD(screen-name, item-name, display-attribute, [process-type])
Where:
- Both the screen-name and item-name arguments are expected to be string expressions, and they can include quoted strings, %variables, field names, or functions.
- The display-attribute value can be one of the following:
- process-type can be one of the following:
'PRINT'
'READ' (the default)
'REREAD'
'TAG'
- The possible function return values are:
- 1 if the attribute is On for the type specified.
- 0 if the attribute is Off for the type specified.
Value | Meaning |
---|---|
'ASK' | Auto-skip |
'BLI' | Blink |
'BLU' | Blue color |
'BRI' | Bright |
'DEF' | Default color |
'GRE' | Green color |
'INV' | Invisible |
'NUM' | Numeric field |
'PIN' | Pink color |
'PRO' | Protected |
'RED' | Red color |
'REV' | Reverse image |
'TUR' | Turquoise color |
'USC' | Underscore |
'WHI' | White color |
'YEL' | Yellow color |
Usage
To check whether the POLNO
(policy number) field in the screen MAIN
is displayed in blue in reread processing, you can enter the following command:
BEGIN SCREEN MAIN INPUT POLNO AT 10 LEN 20 RED END SCREEN MODIFY %MAIN:POLNO TO BLUE FOR REREAD PRINT $CHKSFLD('MAIN','POLNO','BLU','REREAD') END
The result is:
1
Nonfatal errors
If you do not specify colors in the Model 204 screen definition, the color displayed on your terminal is the default color display. For example, you might be looking at a pink display, but when you invoke the $CHKSFLD function, checking for 'PIN'
does not return a 1
, because pink was not assigned by the Model 204 screen definition.
The following messages might be issued:
M204.2462: INVALID ATTRIBUTE SPECIFIED: attribute M204.2462: INVALID ATTR.TYPE SPECIFIED: attr.TYPE M204.0329: SCREEN OR IMAGE ITEM NAME NOT FOUND: name M204.0324: SCREEN, MENU, OR IMAGE NAME NOT DEFINED: name M204.0247: SCREEN, MENU, OR IMAGE NAME NOT SPECIFIED