Can I send a job batch from CICS? We want send job batch normally with control targets. What is the procedure?
There are two ways to get some JCL submitted from CICS. Pick the one which seems most fun for you!
You can use the XC SPOOL commands. These are used to send/get things from JES: consequently, you can send some JCL to JES via the internal Reader and get the JCL run as normal.
To do this use XC SPOOLOPEN OUTPUT USERID('INTRDR') to get thing going, XC SPOOLWRITE to send the CL80 lines of JCL (an XC command per card) and end via XC SPOOLCLOSE which sends the card images off to JES. Don't forget to send a properly formatted Jobcard with the correct puserid/password as the 1st card.
If you are really keen, you can use the equivalent XC SPOOLOPEN INPUT & XC SPOOLREAD to get the output from the submitted job!
The other way is to use a TSQ defined via JCL to be the Internal reader. Then Open it, write CL80 cards and Close the TDQ to subit the job. Using this method means you have to Critical Section (ENQ and DEQ) the TDQ to stop multiple access' to it.
I prefer the former method to the latter.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs? Continue Reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology. Continue Reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible? Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.