Variable validation

HCL Workload Automation for Z can check input entered by the operator at job setup or by a substitution exit. You can specify, for example, whether the input will be numeric or alphabetic, or whether it should match a predefined picture. You can also specify whether the entry should be within a range of values or be one of the values in a given list. Logical comparisons can also be performed; for instance, you can specify that the entered value will be less than, equal to, or not greater than a given value. Define your validation criteria on the SPECIFYING VERIFICATION CRITERIA panel (see EQQJVVEP - Specifying verification criteria). This panel is displayed when you enter the VER command from the MODIFYING A JCL VARIABLE panel (see EQQJVVMP - Modifying a JCL variable).

Figure 1. EQQJVVEP - Specifying verification criteria
EQQJVVEP ------------- SPECIFYING VERIFICATION CRITERIA -----------------
Command ===>

Enter data below, or enter the DEL command to delete the verification.

Variable name         : FRED             varfred
Variable table        : SIMON            test jcl variables

VERIFICATION TYPE  ===> RANGE__      ALPHA/NUM/ENUM/HEX/BIT/PICT/NAME/
                                     DSNAME/RANGE/LIST

LENGTH COMPARISON  ===> __           EQ/LT/GT/LE/GE/NE/NL/NG
LENGTH VALUE       ===> __           1 to 44

For type PICT only - use characters C A N 9 X
PICT VALIDATION    ===> ____________________________________________

LIST/RANGE NUMERIC ===> Y            Y or N  (if Y, specify the values below)
Separate each value (or pair of ranges) in the list with commas
LIST/RANGE VALUES  ===> 23,26____________________________________________
                        _________________________________________________
You can specify these values in the fields on the SPECIFYING VERIFICATION CRITERIA panel:
VERIFICATION TYPE
ALPHA
The input must be alphabetic.
NUM
The input must be numeric, in the range -2³¹ to 2³¹-1.
ENUM
The input must be numeric but can also contain the plus sign (+), negative number indicator, delimiter symbols, decimal symbol (.), or certain national character decimal symbols, such as a comma (,).
HEX
The input must be valid hexadecimal characters.
BIT
The input can have only the digits 0 and 1.
PICT
The input must match a certain pattern.
NAME
The input must be a valid partitioned data set member name.
DSNAME
The input must be a valid data set name. (Lowercase letters are not allowed.)
RANGE
The input must be within the range specified in the Valid values/ranges field.
LIST
The input variable must be a member of the list given in the Valid values/ranges field.
LENGTH COMPARISON and VALUE
These fields are for validating the length of the entered value. The possible comparisons are:
= or EQ
Equal to
< or LT
Less than
> or GT
Greater than
<= or LE
Less than or equal to
>= or GE
Greater than or equal to
!=
Not equal to
!<
Not less than
!>
Not greater than.

For example, to specify that the value of the variable must be less than 6 characters, specify LT 6.

PICT VALIDATION
Specify this only for validation type PICT. The variable must contain characters that match the corresponding characters in the validation pattern. The pattern can have these characters:
C
Any character
A
Any alphabetic character (A–Z, a–z, ?, $, @)
N
Any numeric character (0–9)
9
Any numeric character (same as N)
X
Any hexadecimal character (0–9, A–F, a–f).

For example, if a six-byte field must have its first three characters in the range 0-9, and the last three characters can have any value, specify 999CCC.

LIST/RANGE NUMERIC
This option applies only for types RANGE or LIST. If you specify Y (Yes), HCL Workload Automation for Z performs a numeric comparison with the LIST/RANGE VALUES. If you specify N (No), a character-by-character comparison is performed.
LIST/RANGE VALUES
This field is used for validation types LIST and RANGE. For type LIST, specify the values separated by commas (,) or spaces. For type RANGE, each pair of values in the range is separated by commas, and each range is separated by commas or spaces.
Variable TYPENUMERICVALUES
DAYS-IN-MONTH LISTY28,29,30,31
DAYS-IN-MONTHRANGEY 28,31
DATA-CENTERSLISTNLONDON,NEW YORK
CREDIT-RATINGRANGEN A1,A9,B1,B9
Note:
  1. Embedded blanks are allowed in character values (NEW YORK).
  2. HCL Workload Automation for Z checks that the value for CREDIT-RATING is in the range A1-A9 or B1-B9. Because this is a character comparison, a value A12 is allowed, unless you also specify a length of 2.