VDCL
This command equates a variable to a list of TSO variables that are automatically parsed and combined during VGET and VPUT operations.
Command | Parameters |
---|---|
VDCL | List nameLIST(v1 ... vn) |
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
List name | name of a list of LOCAL or GLOBAL variables | not applicable Refer to Usage limitations for more information. |
LIST | names of the TSO variables to be used in the EXEC | The maximum number of each variable name is 32 characters. The total length of the list of TSO variables cannot exceed 255. The maximum number of variables in the list is 99. Using this statement redundantly in an EXEC will slow the EXEC's execution. |
Usage limitations
The following describes some limitations:
- The following describes some limitations: The ‘List name’ keyword cannot be used in Rules or REXX statements.
The ‘List name’ keyword can be used only with the IMFEXEC VPUT INTO and IMFEXEC VGET INTO commands.
The '‘List name’ keyword is not supported by other IMFEXEC commands other than IMFEXEC VPUT INTO and IMFEXEC VGET INTO.
- The REXX PARSE function is more powerful than IMFEXEC VDCL for parsing or decomposing text. You might chose to use the REXX PARSE function when IMFEXEC VDCL will not provide sufficient results.
- You cannot directly access a LIST variable but instead, you must reference the individual subcomponents.
- There is no corresponding command to reverse the effect of the IMFEXEC VDCL command.
Condition codes are listed in the following table:
Value | Description |
---|---|
0 | Command was executed successfully. |
12 | Invalid syntax was used; no variables were passed. |
Example
Refer to the List name in the VGET command but refer to the actual variable names when you want to access the data in the list. This command is used in conjunction with the IMFEXEC VGET INTO() command and allows for simplified parsing of character strings. There is no corresponding command to reverse the effect of a VDCL.
'IMFEXEC VDCL LINE LIST(P1 P2 P3 P4 P5)'
VAR='THIS IS A TEST'
'IMFEXEC VPUT VAR LOCAL'
'IMFEXEC VGET VAR INTO(LINE) LOCAL'
'IMFEXEC MSG ''P1 P2 P3 P4 P5'''
CLIST example:
SET VAR='THIS IS A TEST'
IMFEXEC VPUT VAR LOCAL
IMFEXEC VGET VAR INTO(LINE) LOCAL
IMFEXEC MSG '&P1 &P2 &P3 &P4 &P5'
After execution of these example commands, the contents of the variables are as follows: