How to run JCL using COBOL

2 posts / 0 new
Last post
Anonymous
How to run JCL using COBOL

 

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
"; ; ; ;
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.                        

Log in or register to post comments
Sponsored Listing