Creating user variables
You can create and use RUV user variables in VSAM name masks in VSAM name models, journal models, internal readers, and job JCL records (skeleton JCL). RUV provides a predetermined set of system variables. You can add other user variables as needed. RUV provides a substring capability that allows you to create variables easily.
For information about how to use the user variables you have created, as well as RUV-defined variables, see Using-variables.
This topic contains the following information:
Using the ADD USER_VARIABLES command
Use the ADD USER_VARIABLES command to define your user variables in RUV.
Defining user variables
A user variable consists of a variable name and its variable substitution value. Each user variable is limited to one command line (71 characters).
variable name
The user variable name must begin with the less-than character (<) and end with the greater-than character (>).
variable substitution value
The variable substitution value must follow the variable name and be coded on the same command line. The first non-blank character that follows the greater-than character becomes the delimiter; the next character is the start of the variable substitution value. You must use the same delimiter character at the end of the variable substitution value to designate the end of the value. The variable substitution value itself may not contain any characters that match the selected delimiter character. The variable substitution value may contain other system or user variables.
Using the END_DATA keyword
Use the END_DATA keyword to indicate the end of the list of user variables.
Working with user variables
After you have defined user variables, you can work with them in various ways. You can use them as substitution values for journal models, job JCL records, internal readers, and VSAM name masks. You can use substring notation to select a portion of a user variable. You can use IBM defined variable substitution symbols. You can list the system variables that RUV has defined. For more information about these topics, see Using-variables.
Coding ADD USER_VARIABLES statements
To code an ADD USER_VARIABLES statement, use the following syntax:
{ COMMENT(comment_fields) };
<variablename> /variable1/
<variablename> /variable2/
END_DATA;
As shown in the following example, use the value of the USER_VARIABLES keyword to define the name of the set of user variables.
COMMENT("Sample RUV User Variables"
"Use With RUV $default Rule Sets"
);
<DASD> /WORK/
<TR> /TRK/
<CT> /CYL/
<PRIMARY_SPACE> /2/
<SECONDARY_SPACE> '0'
<ACCOUNT> '4540'
END_DATA;
Related topic