The GETVARL command returns the names and values of all CA Automation Point status variables in the variable pool matching a specified name mask. A REXX stem variable with a special prefix (GETVL.n) stores the returned status variable names.
This command has the following format:
"GETVARL varnamemask [PREFIX(GETVL|prefix] [MAX(99|nnn)] [SORT(ASCEND|DESCEND)] [TOKEN(0|&GETVLTK)]"
Specifies the variable name mask for the status variable name search. Follow these name mask guidelines:
(Optional) Specifies the prefix of the REXX stem variable containing the status variable names that the GETVARL command returns.
For example, assume that the stem name is the default GETVL. Following standard stem-variable convention, the GETVL.0 variable contains the number of status variables returned. The variables GETVL.1 through GETVL.n each contain the name of a status variable.
Default: GETVL
(Optional) Specifies the maximum number of variables names to return. The maximum valid nnn value is 500.
Default: 99
(Optional) Sorts the returned status variable names alphabetically in ascending (ASCEND) or descending (DESCEND) order.
Default: ASCEND
(Optional) A marker that the GETVARL command uses when it cannot retrieve all of the status variables requested in a single operation (because the number of variable names specified by varnamemask exceeds the current MAX value).
If your GETVARL request cannot return all of the status variable names specified by varnamemask in a single operation, it sets the TOKEN variable &GETVLTK to mark the variable where the search should resume for the next GETVARL operation.
When you issue the GETVARL command for the first time, omit the TOKEN operand or set it to 0 (zero).
If a subsequent GETVARL operation is necessary, specify TOKEN(&GETVLTK) to retrieve the remaining status variable names.
Example:
The following REXX statements list every existing variable:
GETVLTK=0 DO FOREVER "GETVARL * PREFIX(GETVL) SORT(ASCEND) MAX(500) TOKEN(&GETVLTK)" IF GETVL.0=0 THEN LEAVE /* No more variables */ DO I = 1 TO GETVL.0 SAY GETVL.I /* Display variable names */ END END
Note: The DO FOREVER loop is needed to list more than 500 variables. Without it, this code only lists the first 500 variables because of the MAX(500) entry.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|