Idea: Submit JCL from COBOL module

Basically you’re writing an 80 character record to an output file. The output file is assigned to the internal reader via the JCL in the job that is running NOT the job that needs to be executed. Also you can get additional knowledge on Internal reader-COBOL and JCL.

Use a file 
//dd1 DD sysout=(*,intrdr)write your JCL to this file. 

or

//MYOUTPUT DD SYSOUT=whatever your internal reader is at your shop.
SELECT MY-OUTPUT-FILE ASSIGN MYOUTPUT. 
FD MY-OUTPUT-FILE
 etc etc
01 OUTPUT-REC PIC X(80). 
WORKING-STORAGE. 
01 JCL-TABLE.
 05 FILLER PIC X(80) VALUE
 '//MYJOB JOB etc etc..... 
WRITE OUTPUT-REC FROM JCL-CARD (SUB) etc etc 
nothin' to it.
Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.