VLST
This command lists variable names defined in the
BMC AMI Ops Automation
pools.
It returns those names in LOCAL variables LINE1 through LINEn and sets IMFNOL to the count of LINEs.
Command | Parameters |
---|---|
VLST | Variable pattern [SHARED | PROFILE | REXX | LOCAL] |
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
Variable pattern | Name or name pattern for specifying variable names to retrieve | The variable names can be generically expressed by using an asterisk. |
Pool identifier | Pool in which the designated variables reside | The identifier is one of the following pools:
|
Condition codes are listed in the following table:
Value | Description |
---|---|
0 | Command was executed successfully. |
8 | No variable was found. |
12 | Variable pool is not available. |
16 | Sysplex variable name is too long (exceeds 15 characters) |
Example
The following EXEC uses the IMFEXEC VLST command to retrieve all the variables that begin with RETRY and then reports the number of retries. The variable RETRY.termname will contain the number of retries for a terminal.
/*********************************************************/
/* THIS EXEC WILL PRINT RETRY COUNTS FOR ALL TERMINALS */
/*********************************************************/
'IMFEXEC VLST RETRY* SHARED'
IF IMFCC > 0 THEN EXIT
'IMFEXEC VDCL DUMMY1 LIST(VARNAME)'
'IMFEXEC VDCL DUMMY2 LIST(DATE COUNT)'
/* this is the loop to process the returned data */
/* the data is in the LOCAL pool */
DO N = 1 TO IMFNOL
'IMFEXEC VGET LINE'N 'INTO(DUMMY1) LOCAL'
'IMFEXEC VGET' VALUE(VARNAME) 'INTO(DUMMY2) SHARED'
END = LENGTH(VARNAME)
NOD = SUBSTR(VARNAME,7,END-7)
'IMFEXEC MSG '*TERMINAL:' NOD 'RETRIES: 'COUNT'''
END
'IMFEXEC VDEL RETRY* SHARED'
CLIST example:
/*********************************************************/
/* THIS EXEC WILL PRINT RETRY COUNTS FOR ALL TERMINALS */
/*********************************************************/
COUNT: -
IMFEXEC VLST RETRY* SHARED
SET RC = &IMFCC
IF &RC > 0 THEN EXIT
IMFEXEC VDCL DUMMY1 LIST(VARNAME)
IMFEXEC VDCL DUMMY2 LIST(DATE COUNT)
SET N = 1
DO WHILE (&N LE &IMFNOL)
IMFEXEC VGET LINE&N INTO(DUMMY1) LOCAL
IMFEXEC VGET &VARNAME INTO(DUMMY2) SHARED
SET END = &LENGTH(&VARNAME)
SET NOD = &SUBSTR(7:&END,&VARNAME)
IMFEXEC MSG '*TERMINAL: &NOD RETRIES: &COUNT'
SET N = &N + 1
END
IMFEXEC VDEL RETRY* SHARED
Related topic