OPSUBMIT Function

Use the OPSUBMIT function to submit a batch job directly from an OPS/REXX program. The JCL that is submitted can be in either the external data queue or a set of OPS/REXX stem variables.
coema
Purpose
Use the OPSUBMIT function to submit a batch job directly from an OPS/REXX program. The JCL that is submitted can be in either the external data queue or a set of OPS/REXX stem variables.
Supported Coding Environments
This function may be coded in these environments:
AOF Rules
OPS/REXX
TSO/E REXX
TSO/E CLIST
USS Script
No
Yes
No
No
No
System Requirements
This function has no system requirements.
Coding Syntax
This function is coded using this syntax:
var = OPSUBMIT([
stem.
])
Positional Arguments
This function accepts these positional arguments:
#
Argument
Value
1
stem.
(Optional) The name of a REXX stem variable which contains the JCL to be submitted, one card per indexed stem variable of the names
stem
.1,
stem
.2, ...
stem
.n.
If omitted, the JCL to be submitted is on the external data queue (EDQ), one card per queued line.
Keyword Arguments
This function accepts no keyword arguments.
Returned Value
This function returns then number of JCL cards submitted as a batch job.
Returned Variables
This function sets no variables.
Returned EDQ Data
This function adds no data to the EDQ.
Coding Examples
This example submits the same JCL as two unique batch jobs using both formats of the OPSUBMIT function:
qqq.1 = "//TESTJOB JOB REGION=1M," qqq.2 = "// MSGCLASS=X,NOTIFY=USERID1" qqq.3 = "//*" qqq.4 = "// EXEC PGM=IEFBR14" n = OPSUBMIT(qqq.) say n "lines submitted from stem variables" do i = 1 to 4 queue qqq.i end n = OPSUBMIT() say n "lines submitted from the EDQ"
Usage Notes
Consider this information when you use this function:
  • All lines and variables are either truncated or extended to a length of 80 bytes.
  • If you use the OPSUBMIT function in an AOF rule, the function is treated as a null operation and it returns a null string.
  • To use the OPSUBMIT function in a SUB-MSTR OSF environment, the 
    CA OPS/MVS
     OSFGETJOBID parameter must be set to YES.