AOEXEC VGET
This command copies one or more variables from one of the
BMC AMI Ops Automation
pools into the EXECs function pool.
Command | Parameters |
---|---|
AOEXEC VGET | [POOL(SHARED|PROFILE)] SS | SSID(subsystem identifier) [AOOPTION | AOOPT(ANV, CAO, IAO, IIZ, MAO, QAO, or TSH)] [TGTJNT()] [TGTSS(target susbsystem identifier)] VAR(var1...var2...varn) |
The following table describes the parameters.
Parameter | Function | Notes |
---|---|---|
POOL | Pool in which the designated variables reside | Valid values are one of the following pools:
SHARED is the default. |
SS | SSID | Specifies the subsystem identifier of a local subsystem | Generic wildcard characters are supported for this keyword. You can specify 1 to 4 asterisks (*) or plus signs (+).
Use the AOOPTION parameter to further filter on the wildcard value. By specifying a value with AOOPTION, you can route the EXEC to the BMC AMI OpsA BBI-SS PAS that is running a product option or group of product options. AOOPTION is mutually exclusive with TGTSS and TGTJNT, and it is ignored on a fully qualified SSID specified with SS or SSID parameter. |
AOOPTION | Specifies the product options that must be active in the BMC AMI OpsA PAS. The following values are valid: ANV, CAO, IAO, IIZ, MAO, QAO, or TSH. IIZ represents the BMC AMI OpsA BMC Impact Integration for z/OS product. The stand-alone BMC Impact Integration for z/OS product does not support AOAnywhere. | The specified product option must be active in the BMC AMI OpsA PAS. The value specified with the AOOPTION parameter is valid only when the SSID parameter specifies a wildcard value. AOOPTION cannot be specified if TGTSS or TGTJNT are also specified. |
TGTJNT() | A JNT entry that identifies the SSID which processes this request | Use this parameter to specify a different target from the target system where the EXEC is invoked. The specified TGTJNT() should match a TARGET=(tgtname) parameter that is entered in BBPARM member BBIJNT00. The EXEC is scheduled on the subsystem that corresponds to the subsystem that is specified by the SS | SSID parameter of the JNT entry. The specified TGTJNT() may also be an SSID with which the original subsystem communicates. This keyword is mutually exclusive with the TGTSS() keyword. |
TGTSS | If the TGTSS() keyword is specified, the subsystem specified by the SS | SSID() keyword is considered a router and the actual function is executed on the subsystem specified by TGTSS(). If TGTSS() is not specified, the requested function is executed on the subsystem specified by the SS | SSID keyword. | It must be in the same sysplex as the BBI-SS specified with the SSID() keyword, and both systems must have the same XCFGROUP specified in the BBPARM BBISSP xx. When the AOEXEC command originates in a NetView EXEC, the router and local BMC AMI OpsA PAS must have an active, valid BMC AMI Ops Automation Access NV key. |
VAR | name of one or more variables | Each variable name can be up to 32 characters in length. You can use the wildcard characters plus sign (+) and asterisk (*). The plus sign represents one character and the asterisk represents multiple characters. |
Return codes are listed in the following table.
Return code value | Description |
---|---|
See AOEXEC-common-return-codes for a description of return code values that are common to all AOEXEC commands. This table lists additional return codes for this AOEXEC command. | |
8 | Variable does not exist. |
8 | No match was found for one or more of the variable names containing a wildcard character. |
12 | Variable name was not specified. |
16 | Parse failed. |
16 | Variable name starts with numerics. |
16 | Variable name was too long. |
16 | Variable name was not alphanumeric. |
16 | Sysplex variable name is too long (exceeds 15 characters). |
Additional usage notes for the VAR parameter
The AOEXEC VGET VAR(var1 and so on) command retrieves variables and stores the variables names in TSO variables VAR1 through VARnnnn, where nnnn is the last variable. The VARCT 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 VARnnnn variable.
Examples
This example displays the contents of the EXECs SHARED variable pool. It uses the VLST command to retrieve the names of all variables in that pool.
It then uses the VGET command to retrieve them one after the other and displays their contents.
REXX EXEC example:
do i=1 to lcnt
var=value(value(line)i)
"AOEXEC VGET VAR('var') POOL(SHARED) SSID(RE61)"
say var
end
CLIST example:
AOEXEC VLST VAR(*) POOL(SHARED) SSID(RE61)
SET I=1
DO WHILE &I LE &LCNT
SET VAR=LINE&I
SET VAR=&&&VAR
AOEXEC VGET VAR(&VAR) POOL(SHARED) SSID(RE61)
WRITE &VAR
SET I=&I+1
END
The following example shows the AOEXEC VGET VAR command using a wildcard character:
say 'QIMFID:' QIMFID
say 'QSAFID:' QSAFID
say 'QSMFID:' QSMFID
Sample output:
QIMFID: JB73
QSAFID: BAOSTC
QSMFID: SJSD
The following example shows the AOEXEC VGET VAR command using a wildcard character and how the command retrieves and displays VARnnnn TSAO variables:
PARSE UPPER ARG EXECNAME FILLER
/* -------------------------------------------------------------- */
/* Issue the AOEXEC VGET service */
/* -------------------------------------------------------------- */
"AOEXEC VGET VAR(Q*ID CSMREPDS) POOL(SHARED) SSID(KMZ2) TGTSS(KMZ2)"
VGET_IMFRC = IMFRC
/* -------------------------------------------------------------- */
/* Report on: */
/* - IMFRC from AOEXEC VGET */
/* - VARCT (number of variable names processed by VGET) */
/* -------------------------------------------------------------- */
"IMFEXEC MSG '+'"
"IMFEXEC MSG '+ "LEFT('IMFRC for VGET',14)" is "VGET_IMFRC"'"
"IMFEXEC MSG '+ "LEFT('VARCT',14)" is "VARCT"'"
"IMFEXEC MSG '+'"
/* -------------------------------------------------------------- */
/* Report on: */
/* - Variable values returned from AOEXEC VGET */
/* - Variable names processed by AOEXEC VGET */
/* -------------------------------------------------------------- */
DO N = 1 TO VARCT
"IMFEXEC MSG '+ "LEFT('VAR'||N,14)||,
" is ''"VALUE(LEFT(VAR||N,LENGTH(VAR||N)))"'''"
"IMFEXEC MSG '+ "LEFT('it contains',17)||" ''"||,
VALUE(LEFT(VALUE(VAR||N),LENGTH(VALUE(VAR||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:
+
+ IMFRC for VGET is 0000
+ VARCT is 6
+
+ VAR1 is 'QSAFID'
+ it contains 'TSGSTC'
+
+ VAR2 is 'QCASID'
+ it contains 'KZC2'
+
+ VAR3 is 'QIMFID'
+ it contains 'KMZ2'
+
+ VAR4 is 'QIMSID'
+ it contains ''
+
+ VAR5 is 'QSMFID'
+ it contains 'SJSC'
+
+ VAR6 is 'CSMREPDS'
+ it contains 'BAOKMZ.KMZ2.BBIREPS'
+
+ End of EXEC
Related topic