Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

Mainframe Interview Questions :: RE: How to run a job from COBOL

$
0
0
Author: steve-myers
Posted: Mon Feb 20, 2017 6:10 pm (GMT 5.5)

Running the TSO SUBMIT command from a Cobol program is more complex than it has to be.

In z/OS, the system provides a capability called an "internal reader." An internal reader is a pseudo data set specified in JCL as

//ddname DD SYSOUT=(x,INTRDR)

The x in SYSOUT=(x,INTRDR) becomes the output message class for the submitted job unless the job's // JOB statement specifies MSGCLASS=y.

With the internal reader specified in the JCL used to run a Cobol program, all the Cobol program has to do is open the data set assigned to DD name ddname for output and write the JCL for the job the Cobol program wants to run to the data set.

This capability has been in the system since the first release of MVS. Use it!


Viewing all articles
Browse latest Browse all 9405

Trending Articles