How do you submit JCL via a Cobol program?

Answer Posted / bala

Jcl:
JOB: //STEP1 EXEC PGM=MAINPM
//DD1 DD DSN=MUTHU.TEST,DISP=SHR
//JCLDD DD SYSOUT=(*,INTRDR)

Cobol:
PROGRAM:MAINPGM
SELECT JCLFILE ASSIGN TO JCLDD…. (Environment Division)
FD JCLFILE.
01 JCL-REC PIC X(80). (File Section)
OPEN OUTPUT JCLFILE. (Open in output and write JCL statements)
MOVE ‘//TESTJOB JOB 1111’ TO JCLREC.
MOVE ‘//STEP01 EXEC PGM=IEFBR14’ TO JCLREC.
CLOSE JCLFILE (TESTJOB will be submitted automatically)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to alter the parameters for the existing gdg?

799


In sms datasets, what is the function of the dd mgmtclas keyword?

976


What dd statement is used to supply the name of a dataset?

909


What is the function of //cntl statement?

930


What is the significance of addrspc parameter in exec statement?

817






How does jcl act on code(if you take a cobol program)?

814


WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

946


What is the function of dd disp parameter?

736


Must tape dataset definitions include vol=ser specifications?

1138


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

765


what EXEC statement is and what is the syntax of EXEC statement used in JCL?

733


What is multithreading in jcl?

1038


how you can access an uncataloged dataset in a JCL?

745


Name a few IBM utility programs, and explain its function.

4538


What parameter of the job statement is used to limit the cpu time consumed by the job?

933