Previous Topic: OPSTORE Function

Next Topic: Usage Notes for OPSUBMIT

OPSUBMIT Function

The OPSUBMIT function lets you 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.

Note: The OPSUBMIT function can be used only in OPS/REXX.

This function has the following two formats:

Example: OPSUBMIT

This example illustrates using the OPSUBMIT function to submit the same rule twice, first from stem variables, and then from the external data queue:

qqq.1 = "//TESTJOB      JOB  REGION=1M,"
qqq.2 = "//             MSGCLASS=X,NOTIFY=USERID1"
qqq.3 = "//*"
qqq.4 = "// EXEC PGM=IEFBR14"
temp = OPSUBMIT(qqq.)
say temp "lines submitted from stem variables”
do i = 1 to 4
  queue qqq.i
end
temp = OPSUBMIT()