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.

VGETL


This command copies one or more long variables from one of the 

BMC AMI Ops Automation

 pools into the TSO pool.

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.

This variable operation only supports a subset of the functions available for the short variables. It ONLY affects and searches for long variables. If a short variable (created with VPUT instead of VPUTL) with the specified name exists, it is ignored.

Command

Parameters

VGETL

variableName | (var1... varN)

[LOCAL|SHARED|PROFILE]

The following table describes the parameter:

Parameter

Function

Notes

variable name|(var1, var2...varN)

Name of one or more variables

When you specify more than one variable, you must enclose the variable names in parentheses.

Each variable name can be up to 30 characters.

You can use the wildcard characters plus sign (+) and asterisk (*). The plus sign represents one character and the asterisk represents multiple characters.

Pool identifier

Pool in which the designated variables reside

One of the following pools:

SHARED is the default.

Condition codes are listed in the following table:

Value

Description

0

The variable existed in the target pool and has been retrieved.

8

No long variable with this name has been found in the target pool.

8

No match found for one or more of the variable names containing a wildcard character.

16

Syntax error occurred.

16

Sysplex variable name is too long (exceeds 13 characters, the limit for long sysplex variable names).

20

Variable pool was not found (BBIVARS not allocated).

Additional usage notes for the VAR parameter

The IMFEXEC VGETL var1 and so on) command retrieves variables and stores the variables names in TSO variables IMFVAR1 through IMFVARnnnn, where nnnn is the last variable. The IMFVAR variable contains the value of nnnn). If a variable name contains a wildcard character but there are no matching names in the pool, that name is not stored to a IMFVARnnnn variable.

Examples

The PROFILE pool is searched for a long variable with the name of X. If found it is placed into the TSO pool. It is then assigned to the variable Y.

REXX EXEC example:

'IMFEXEC VGETL X PROFILE'
y=x

CLIST example:

IMFEXEC VGETL X PROFILE
SET Y=X

The following example shows the IMFXEC VGETL command using a wildcard character:

'IMFEXEC  VGETL (CICS*_FILES)'
"IMFEXEC MSG 'CICSPRD1_FILES:" CICSPRD1_FILES"'"
"IMFEXEC MSG 'CICSPRD2_FILES:" CICSPRD2_FILES"'"
"IMFEXEC MSG 'CICSPRD3_FILES:" CICSPRD1_FILES"'"
"IMFEXEC MSG 'CICSPRD4_FILES:" CICSPRD4_FILES"'"
"IMFEXEC MSG 'CICSPRD5_FILES:" CICSPRD5_FILES"'"

Sample output:
CICSPRD1_FILES: CICSPRD1.WEBAPP1.FILE1 CICSPRD1.WEBAPP1.FILE2 CICSPRD1.WEBAPP1.FILE3 ...
CICSPRD2_FILES: CICSPRD2.WEBAPP2.FILE1 CICSPRD2.WEBAPP2.FILE2 CICSPRD2.WEBAPP2.FILE3 ...
CICSPRD3_FILES: CICSPRD3.WEBAPP3.FILE1 CICSPRD3.WEBAPP3.FILE2 CICSPRD3.WEBAPP3.FILE3 ...
CICSPRD4_FILES: CICSPRD4.WEBAPP4.FILE1 CICSPRD4.WEBAPP4.FILE2 CICSPRD4.WEBAPP4.FILE3 ...
CICSPRD5_FILES: CICSPRD5.WEBAPP5.FILE1 CICSPRD5.WEBAPP5.FILE2 CICSPRD5.WEBAPP5.FILE3 ...

The following example shows the IMFEXEC VGETL command using a wildcard character and how the command retrieves and displays IMFVARnnnn TSO variables:

/* REXX */                                                              
PARSE UPPER ARG EXECNAME FILLER                                         
                                                                       
/* -------------------------------------------------------------- */    
/* Issue the IMFEXEC VGETL service                                */    
/* -------------------------------------------------------------- */    
'IMFEXEC VGETL (K* GARY) SHARED'                                        
VGETL_IMFCC = IMFCC                                                     
                                                                       
/* -------------------------------------------------------------- */    
/* Report on:                                                     */    
/* - IMFCC from IMFEXEC VGETL                                     */    
/* - IMFVARCT (number of variable names processed by VGETL)       */    
/* -------------------------------------------------------------- */    
'IMFEXEC MSG '+''                                                       
'IMFEXEC MSG '+ 'LEFT('IMFCC for VGETL',15)' is 'VGETL_IMFCC'''         
'IMFEXEC MSG '+ 'LEFT('IMFVARCT',15)' is 'IMFVARCT'''                   
'IMFEXEC MSG '+''                                                       
                                                                       
/* -------------------------------------------------------------- */    
/* Report on:                                                     */    
/* - Variable values returned from IMFEXEC VGETL                  */    
/* - Variable names processed by IMFEXEC VGETL                    */    
/* -------------------------------------------------------------- */    
DO N = 1 TO IMFVARCT                                                    
  'IMFEXEC MSG '+ 'LEFT('IMFVAR'||N,15)||,                              
    ' is '''VALUE(LEFT(IMFVAR||N,LENGTH(IMFVAR||N)))'''''               
  'IMFEXEC MSG '+ 'LEFT('it contains',18)||' '''||,                     
    VALUE(LEFT(VALUE(IMFVAR||N),LENGTH(VALUE(IMFVAR||N))))'''''         
  'IMFEXEC MSG '+''                                                     
END                                                                     
                                                                       
/* -------------------------------------------------------------- */    
/* Indicate the end of the EXEC and then return to the caller.    */    
/* -------------------------------------------------------------- */    
'IMFEXEC MSG '+ End of EXEC''                                           
                                                                       
'IMFEXEC EXIT CODE(0)'   
Sample output:
+                                
+ IMFCC for VGETL is 0000         
+ IMFVARCT        is 4            
+                                
+ IMFVAR1         is 'KSYSNAME'   
+ it contains        'SJSC'       
+                                
+ IMFVAR2         is 'KSMFID'     
+ it contains        'SJSC'       
+                                
+ IMFVAR3         is 'KQMFID'     
+ it contains        'KMZ2'       
+                                
+ IMFVAR4         is 'GARY'       
+ it contains        'SPONGEBOB'  
+                                
+ End of EXEC

 

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

BMC AMI Ops Automation 8.3