CA OPS/MVS lets you specify variables in an action clause. This product enables variables by assigning values to the variables when SSM initiates the action in the clause.
You can specify action text variables in two ways. The first method is compatible with previous versions of SSM, and the second method follows the rules of REXX host command string processing.
When you use the first method (ampersand prefixed variable name), CA OPS/MVS provides a substring functionality to extract desired substring from the variable name.
To use the first method, you specify variables in a manner similar to TSO/E CLIST syntax:
To use the second method for specifying action text variables follows the rules of REXX host command string processing:
When CA OPS/MVS evaluates action text, it first evaluates according to the TSO/E CLIST method, and then evaluates again using the REXX syntax method. To prevent an inadvertent variable substitution, enclose all command text in quotes in the action keyword specification.
Example: Variables that are specified in action clauses.
The following command text string is enclosed in quotes to prevent variable substitution.
TSOCMD("OPSCMD COMMAND(START &JOBNAME..&JOBNAME) NOOUTPUT SUBSYS("GLOBAL0.MYSUB")")
In this example, if the JOBNAME column in the resource table has the value of RMF and the GLOBAL0.MYSUB variable has the value OPSX, then the following command is submitted to the server:
OPSCMD COMMAND(START RMF.RMF) NOOUTPUT SUBSYS(OPSX)
For a DB2 subsystem that uses a quotation mark (") as a command character, suppose that you have this action text:
TSOCMD("OPSCMD COMMAND(OI STOPDB2 CMDCHAR("")) JOBNAME("JOBNAME")")
This text yields the following command:
OPSCMD COMMAND(OI STOPDB2 CMDCHAR(") JOBNAME(DSN2MSTR)
The following command text string is the DB2 START command.
MVSCMD("-&JOBNAME(1,4) START DB2”)
To start a DB2, use the DB2 command prefix which in most cases have the first four letters of the master address space. In this example, if the JOBNAME column in the resource table has the value of DB2PMSTR following command is submitted to MVS:
-DB2P START DB2
Shorthand global variables can also be used. These variables have the format &.varname. SSM resolves these variables by replacing the ampersand (&) with a system-specific prefix, and then treating them as global variables. The system prefix that the SSMGLVPREFIX parameter sets, which you set independently on each system.
During the REXX substitution phase of action text processing, the & can be omitted if the variable name is not embedded in a quoted string.
Copyright © 2014 CA.
All rights reserved.
|
|