Natural for Mainframes Version 8.2.5 for Mainframes
 —  Parameter Reference  —

CV - Attribute Control Variable

This session parameter is used to reference an attribute control variable.

Possible settings B, C, D, I, N, U, V Field representation attributes (see session parameter AD).
P Field protection (see session parameter AD).
BL, GR, NE, PI, RE, TU, YE Color (for an explanation of the color codes, see the session parameter CD).
Default setting none  
Applicable statements

DISPLAY
INPUT
PRINT
PROCESS PAGE
WRITE

Parameter may be specified at statement level and/or at element level.
Applicable command none  

Notes:

  1. An attribute control variable is defined with Format C (see Special Formats in the Programming Guide) and is used to assign field attributes dynamically and/or check the "modified" status of a field in conjunction with an INPUT or PROCESS PAGE statement; see also Logical Condition Criteria, MODIFIED Option - Check wether Field Content has been Modified in the Programming Guide.
  2. By specifying the MODIFIED option of the IF statement, the attribute control variable can be used to check whether the contents of a field has been modified during the execution of an INPUT or PROCESS PAGE statement: IF #ATTR MODIFIED ...
  3. A single attribute control variable can be applied to several input fields by specifying it once at statement level or multiple times at element level, in which case the "modified" status indication is set if any of the fields referencing the control variable has been modified. If the CV parameter is specified both at statement level and at field level and the attribute control variable for the individual field is empty, the attribute control variable for the statement will be used for the field.
  4. The attribute control variable can be expanded up to three dimensions, for example, CONTR(*), CONTR(*,*), CONTR(*,*,*), depending on the rank of the corresponding array.

Example:

DEFINE DATA LOCAL 
1 #ATTR(C) 
1 #A   (N5) 
END-DEFINE 
... 
MOVE (AD=I CD=RE) TO #ATTR 
INPUT #A (CV=#ATTR) 
...

Top of page