$CHKSFLD: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (misc formatting)
 
Line 1: Line 1:
<p>Use the $CHKSFLD function to determine whether a display attribute is applied to a screen item for a specified type of screen processing.</p>
<p>
<b>Syntax</b>
Use the <var>$CHKSFLD</var> function to determine whether a display attribute is applied to a screen item for a specified type of screen processing.</p>
<p class="code">$CHKSFLD(screen-name,item-name,display-attribute,


        [process-type])
==Syntax==
<p class="syntax">$CHKSFLD(<span class="term">screen-name, item-name, display-attribute</span>, [<span class="term">process-type</span>])
</p>
</p>
<b>Where</b>
<p>
Where:</p>
<ul>
<ul>
<li>Both the screen-name and item-name arguments are expected to be string expressions and can include quoted strings, %variables, field names, or functions. </li>
<li>Both the <var class="term">screen-name</var> and <var class="term">item-name</var> arguments are expected to be string expressions, and they can include quoted strings, %variables, field names, or functions. </li>
</li>
 
<li>display-attribute value can be one of the following:</li>
<li>The <var class="term">display-attribute</var> value can be one of the following:</li>
<table>
<table>
<tr class="head">
<tr class="head">
Line 15: Line 16:
<th>Meaning</th>
<th>Meaning</th>
</tr>
</tr>
<tr>
<tr>
<td>'ASK'</td>
<td>'ASK'</td>
<td>Auto-skip</td>
<td>Auto-skip</td>
</tr>
</tr>
<tr>
<tr>
<td>'BLI'</td>
<td>'BLI'</td>
<td>Blink</td>
<td>Blink</td>
</tr>
</tr>
<tr>
<tr>
<td>'BLU'</td>
<td>'BLU'</td>
<td>Blue color</td>
<td>Blue color</td>
</tr>
</tr>
<tr>
<tr>
<td>'BRI'</td>
<td>'BRI'</td>
<td>Bright</td>
<td>Bright</td>
</tr>
</tr>
<tr>
<tr>
<td>'DEF'</td>
<td>'DEF'</td>
<td>Default color</td>
<td>Default color</td>
</tr>
</tr>
<tr>
<tr>
<td>'GRE'</td>
<td>'GRE'</td>
<td>Green color</td>
<td>Green color</td>
</tr>
</tr>
<tr>
<tr>
<td>'INV'</td>
<td>'INV'</td>
<td>Invisible</td>
<td>Invisible</td>
</tr>
</tr>
<tr>
<tr>
<td>'NUM'</td>
<td>'NUM'</td>
<td>Numeric field</td>
<td>Numeric field</td>
</tr>
</tr>
<tr>
<tr>
<td>'PIN'</td>
<td>'PIN'</td>
<td>Pink color</td>
<td>Pink color</td>
</tr>
</tr>
<tr>
<tr>
<td>'PRO'</td>
<td>'PRO'</td>
<td>Protected</td>
<td>Protected</td>
</tr>
</tr>
<tr>
<tr>
<td>'RED'</td>
<td>'RED'</td>
<td>Red color</td>
<td>Red color</td>
</tr>
</tr>
<tr>
<tr>
<td>'REV'</td>
<td>'REV'</td>
<td>Reverse image</td>
<td>Reverse image</td>
</tr>
</tr>
<tr>
<tr>
<td>'TUR'</td>
<td>'TUR'</td>
<td>Turquoise color</td>
<td>Turquoise color</td>
</tr>
</tr>
<tr>
<tr>
<td>'USC'</td>
<td>'USC'</td>
<td>Underscore</td>
<td>Underscore</td>
</tr>
</tr>
<tr>
<tr>
<td>'WHI'</td>
<td>'WHI'</td>
<td>White color</td>
<td>White color</td>
</tr>
</tr>
<tr>
<tr>
<td>'YEL'</td>
<td>'YEL'</td>
<td>Yellow color</td>
<td>Yellow color</td>
</tr>
</tr>
</table>
</table></li>
</li>
 
<li>process-type can be one of the following:</li>
<li><var class="term">process-type</var> can be one of the following:
</li>
 
</ul>
<p>'PRINT'</p>
<p>'PRINT'</p>
<p>'READ' (the default)</p>
<p>'READ' (the default)</p>
<p>'REREAD'</p>
<p>'REREAD'</p>
<p>'TAG'</p>
<p>'TAG'</p></li>
<b>Returns</b>
 
<li>The possible function return values are:
<ul>
<ul>
<li>1 if the attribute is ON for the type specified.</li>
<li>1 if the attribute is On for the type specified.</li>
</li>
 
<li>0 if the attribute is OFF for the type specified.</li>
<li>0 if the attribute is Off for the type specified.</li>
</li>
</ul>
</ul>
</ul>
<b>Usage</b>
 
<p>For example, if you want to check whether the POLNO (policy number) field in the screen MAIN is displayed in blue in reread processing, enter the following command:</p>
==Usage==
<p>
To check whether the <code>POLNO</code> (policy number) field in the screen <code>MAIN</code> is displayed in blue in reread processing, you can enter the following command:</p>
<p class="code">BEGIN
<p class="code">BEGIN
SCREEN MAIN
SCREEN MAIN
Line 105: Line 124:
END
END
</p>
</p>
<p>Produces the following output:</p>
<p>
<p class="code">1
The result is:</p>
<p class="output">1
</p>
</p>
<b>Nonfatal errors</b>
<p>If you do not specify colors within the <var class="product">Model&nbsp;204</var> 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 <var class="product">Model&nbsp;204</var> screen definition. </p>
<p>The following messages might be issued:</p>
<p class="code">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 


===Nonfatal errors===
<p>
If you do not specify colors in the <var class="product">Model&nbsp;204</var> 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 <var>$CHKSFLD</var> function, checking for <code>'PIN'</code> does not return a <code>1</code>, because pink was not assigned by the <var class="product">Model&nbsp;204</var> screen definition. </p>
<p>
The following messages might be issued:</p>
<p class="code">M204.2462: INVALID ATTRIBUTE SPECIFIED: <i>attribute</i>
M204.2462: INVALID ATTR.TYPE SPECIFIED: <i>attr.TYPE</i>
M204.0329: SCREEN OR IMAGE ITEM NAME NOT FOUND: <i>name</i>
M204.0324: SCREEN, MENU, OR IMAGE NAME NOT DEFINED: <i>name</i> 
M204.0247: SCREEN, MENU, OR IMAGE NAME NOT SPECIFIED
M204.0247: SCREEN, MENU, OR IMAGE NAME NOT SPECIFIED
</p>
</p>
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 21:09, 1 November 2017

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:
  • 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
  • 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.

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