Information
Newer version of documentation BMC provides a newer version of the documentation for this version of the product. As a result, BMC no longer accepts comments in this space.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see bao8301.

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.

Warning

Note

This command supports the use of sysplex variables; refer to Using-sysplex-variables for more information about restrictions with sysplex variables (such as with wildcard characters and abbreviations) and other important information.

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:

  • SHARED
  • PROFILE
  • REXX
  • LOCAL
    • LOCAL variables whose names begin with the characters LINE will not be displayed

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.

/* REXX */
/*********************************************************/
/* 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:

PROC 1 EXECNAME
/*********************************************************/
/* 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

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Automation 8.3