The OPSEXEC (OX) command processor causes an explicitly specified program to run. The function of OPSEXEC compares to that of OPSIMEX, except that OPSEXEC requires that you supply the full command path. OPSEXEC can execute a command that is outside the command concatenation.
OPSEXEC has the following syntax:
OPSEXEC|OX
{PROGRAM('dsname')|PROGRAM('dsname(member)')}
[ARG('arguments')]
[ITRACE(x)]
[MAXEDQ(lines)]
[SUBSYS(ssid)]
[WORKSPACE(size)]
To execute an OPS/REXX source program directly from TSO READY mode (or ISPF PDF menu 6) using the OPS/REXX interpreter, use either of the following formats for OPSEXEC:
OPSEXEC "dsname" argument
OX "dsname" argument
You can abbreviate the PROGRAM, ARG, and SUBSYS keywords as P, A, and S respectively.
This argument defines the data set (or optionally, member) of the OPS/REXX source program to execute.
You can provide the PROGRAM name as a fully qualified data set name, enclosed in single quotes, and can represent either a sequential data set or a PDS. If you specify a PDS, then you must also specify a member.
You can also specify a member of a precompiled REXX data set. The record formats supported for the SYSEXEC libraries are the same as those formats supported for REXX data sets used to invoke OPS/REXX explicitly.
You can provide the program name as an unquoted data set name or an unquoted data set name and member name. If you do not use quotes, then the OPSEXEC command processor creates a data set name that consists of your default TSO prefix, then any data set name that you specified, and finally REXX.
Examples: PROGRAM arguments
ADDRESS TSO "OPSEXEC PROGRAM('TSOPFX.OPS.PROGRAM1')"
ADDRESS TSO "OPSEXEC PROGRAM('OPSPFX.OPS.REXX(TESTPROG)')"
ADDRESS TSO "OPSEXEC PROGRAM(O)"
OPSEXEC expands the previous example to HLQ.O.REXX, which is presumed to be a sequential data set. HLQ represents your default TSO prefix. Similarly, OPSEXEC would expand PROGRAM(O(member)) to HLQ.O.REXX(member), and PROGRAM((member)) expands to HLQ.REXX(member).
(Optional) Specifies any characters to be passed to the program. Leading blanks are stripped from the argument. Enclose the argument in quotes only if you want to pass those quotes to the program. The 'arguments' string cannot exceed 256 characters in length. The following three examples show sample arguments:
The following command invokes program 'userprefix.MYLIB.REXX(ABC)' with a null argument:
OX MYLIB(ABC)
The following command invokes program 'SYS1.REXX(ABC)' with an argument of Now is the time:
OX "SYS1.REXX(ABC)" Now is the time
The following command invokes the program 'userprefix.REXX(ABC)' with the argument string 'SYS1.LINKLIB'.
Note: The quotes are part of the argument that passed to the program.
OX (ABC) "SYS1.LINKLIB"
Note: If the argument string includes a quotation mark, OPS/REXX must be able to tell the difference between a quote that is part of a string and the quotes that delimit the string.
To signify that a quote is part of a string, you can use a pair of quotation marks to represent it as shown in the following example:
OI PROGRAM(TEST) ARG('There is a single quote ''in this arg string')
OI PROGRAM(TEST) ARG("There is a double quote ""in this arg string")
However, a better way to distinguish a quote in a string from the string delimiters is to make the delimiters a different type of quote from that used in the string. For example, if the string contains a double quote, use single quotes as string delimiters. Conversely, if the string contains a single quote, use double quotes as string delimiters. Consider the following example:
OI PROGRAM(TEST) ARG("There is a single quote 'in this arg string")
OI PROGRAM(TEST) ARG('There is a double quote "in this arg string')
If the argument string includes any unbalanced parentheses, OPS/REXX must be able to tell the difference between an unbalanced parenthesis that is part of a string and a command syntax error. To signify that unbalanced parentheses are part of a string, you must enclose the string in quotation marks as shown in the following example:
OI PROGRAM(TEST) ARG('There is an unbalanced (parentheses in this arg string')
OI PROGRAM(TEST) ARG("There is an unbalanced) parentheses in this arg string")
You do not have to enclose argument strings that contain balanced parentheses in quotation marks. In fact, CA OPS/MVS does not even require that you use the keyword format of the command in such cases, as shown in the following example:
OI PROGRAM(TEST) ARG(There is a balanced () parentheses in this arg string)
OI TEST There is a balanced ( parentheses ) in this arg string
(Optional) Sets an initial TRACE value for program execution.
The ITRACE keyword enables you to do debugging without having to add a TRACE statement to your OPS/REXX program.
This debugging is useful especially for debugging precompiled OPS/REXX programs. You do not have to go back and edit the source version to add the TRACE statement to perform debugging. You can specify any of these values in place of x:
Note: Any TRACE statement that is in the OPS/REXX program overrides the value that you specify for the ITRACE keyword.
(Optional) Overrides the value (for this execution only) of the REXXMAXQUEUE parameter. The REXXMAXQUEUE parameter sets the maximum number of output lines that an OPS/REXX program or request rule can have in its external data queue. For more information about the REXXMAXQUEUE parameter, see the Parameter Reference.
For more information on the SUBSYS keyword, see Specify a Subsystem ID on a POI Command Processor.
(Optional) Defines the size of the REXX program workspace, as specified in bytes. The default size is 1.5 MB. The minimum value is 40960, which only works for OPS/REXX programs that use few variables. For example, if a program creates many stem variables (compound symbols) and you want a 3-MB area, you would specify WORKSPACE(3145728).
Workspace size limits the maximum number of nested calls, symbols, and values that can be used during program execution. If your programs have large memory requirements, use the size value to specify a workspace that is larger than the default.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|