How to submit a JCL through SQR Call System Command on MVS z/os?

339 Views Asked by At

I’m trying to submit a JCL through an SQR Program using Call System Command on MVS z/os. The JCL resides in specific Dataset.

What I’m trying do is something like this:

  1. let $jclcmd= 'SUBMIT PSLIBDSN.O92.CUST7.JCLSRC(UTILI)'
  2. call system using $jclcmd #rtnstat

Up to this point, I have not been able to submit the JCL. What I get from the mainframe is this error: **** WARNING **** ERRNO = ESYS Generated in SYSTEM called from line 389 of SYS(UCALL) , offset 000118 Program SUBMIT was abnormally terminated with a system code of 66D.SYS(UCALL) , offset 000118

I also tried let $jclcmd= 'TSO SUBMIT PSLIBDSN.O92.CUST7.JCLSRC(UTILI)' but gets this: Program TSO was abnormally terminated with a system code of 806. SYSTEM COMPLETION CODE=806 REASON CODE=00000004

Up to this point I have thought that the call system function does not allow operating system commands to be executed for reasons of incompatibility with MVS. The reality is that the SQR documentation does not mention that it is not, but always mentions Windows and UNIX as an example. I have made a thousand attempts to execute a REXX program, submit a JCL and others but looks like the function is not right assembling the command. Any idea will be welcome.

0

There are 0 best solutions below