Skip to Content
Custom Search

How to run JCL using COBOL

1 reply [Last post]
Anonymous

 

Is there a way why which we can submit a JCL
using a COBOL program?
 
If someone could put up an example, it will be great
 
Thanks
Krishna
"; ; ; ;
Sponsored Listing
Anonymous
Yes, allocate an internal

Yes, allocate an internal reader file and write the JCL to that file

//SUBJCL  DD  SYSOUT=(A,INTRDR)

SELECT SUBJCL-FILE ASSIGN TO SUBJCL.

........

FD  SUBJCL-FILE                           
    RECORDING MODE IS F                   
    BLOCK CONTAINS 0 RECORDS.             
01  SUBJCL-REC                  PIC X(80).

.......

OPEN OUTPUT SUBJCL-FILE.

MOVE JCL-LINE1 TO SUBJCL-REC.

WRITE SUBJCL-REC.

MOVE JCL-LINE2 TO SUBJCL-REC.

WRITE SUBJCL-REC.  

.........   

CLOSE SUBJCL-FILE.                        

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 19 guests online.
Dr. Radut | forum