JCLVVAR – Variable details

Use the JCLVVAR statement to define a variable.

Table 1. Keywords for JCLVVAR
Keyword Description
VARNAME Specifies the name of the variable.
COMP Specifies the way in which the LENGTH field is used to validate the length of the replaced value. This field is optional, unless you specify a length value.

For example, EQ 12 means that the replaced value must be exactly 12 characters long.

EQ or =
Equal to
GT or >
Greater than
LT or <
Less than
GE or >=
Greater than or equal to
LE or <=
Less than or equal to
NE or ¬=
Not equal to
NG or ¬>
Not greater than
NL or ¬<
Not less than
DEFAULT Specifies the value the variable must have if another values is not explicitly assigned, up to 44 characters.
DEPENDENCY Specifies the name of a variable on which the value of this variable is dependent. This requires JCLVDEP statements to be defined.
DESCR Specifies a description of, for example, the purpose and use of the variable, up to 20 characters.
DIALOG1 Specifies line 1 (of 4) of information for the preparer. Each line can be up to 51 characters long.
DIALOG2 Specifies line 2 (of 4) of information for the preparer. Each line can be up to 51 characters long.
DIALOG3 Specifies line 3 (of 4) of information for the preparer. Each line can be up to 51 characters long.
DIALOG4 Specifies line 4 (of 4) of information for the preparer. Each line can be up to 51 characters long.
EXIT Specifies a substitution exit to be used to resolve the variable.
LENGTH Use this field together with COMP to validate the length of the value substituted by the job preparer. This is optional, unless you specify a length comparison.

For example, LT 11 means that the replaced value must be less than 11 characters.

NUMERIC Specifies if the data must be numeric:
Y
Data must be numeric.
N
Data can have any values.

Specify this filed only if TYPE is set to LIST or RANGE.

PICT Specifies the character pattern used together with the verification TYPE PICT. Optional, unless TYPE is PICT.

For example, CC99 means that the first two characters can have any value and characters 3 and 4 must be in the range 0-9.

Use the characters C (any value), A (alphabetic), N or 9 (0-9), X (0-9, A-F, a-f).

POS Specifies the starting position, in a range from 1 to 80, for a value assigned to an in-stream positional variable, or 0 if the variable is not positional. The default is 0.
REQD Specifies whether the variable can be assigned a blank value or not:
N
Not required. The variable can be assigned a blank value (this is the default).
Y
Required. The variable cannot be assigned a blank value.
SETUP Specifies how variable substitution is managed:
N
No interaction. The variable is replaced at submit time.
P
Promptable. An interaction with the preparer takes place at job setup.
Y
No interaction. The variable is replaced at setup time if a preparation step if present, otherwise at submit time.
SUBPOS Position in string to start substring selection for dependent variables.
SUBLEN Length of substring selection for dependent variables.
TYPE Specifies the type of verification to be carried out on the data specified by the preparer. This follows the same format rules as the ISPF VER statement. Optional. Valid types are:
  • ALPHA
  • BIT
  • DSNAME
  • ENUM
  • HEX
  • LIST
  • NAME
  • NUM
  • PICT
  • RANGE
UCASE Specify Y to get characters a-z translated to upper case. Specify N to keep mixed case (the default is N).
VALID1 Line 1 of LIST/RANGE values for use in validating the variable (up to 51 characters).

For type LIST, specify one or more values separated by commas.

For type RANGE, specify pairs of values separated by commas.

For example, 1,3,5,7 allows values in the ranges 1 to 3 and 5 to 7.

Specify this keyword only if the TYPE is LIST or RANGE.

VALID2 Line 2 of LIST/RANGE values for use in validating the variable (up to 51 characters).

For type LIST, specify one or more values separated by commas. For type RANGE, specify pairs of values separated by commas.

For example, 1,3,5,7 allows values in the ranges 1 to 3 and 5 to 7.

Specify this keyword only if the TYPE is LIST or RANGE.