How do you submit JCL via a Cobol program?

Answers were Sorted based on User's Feedback



How do you submit JCL via a Cobol program?..

Answer / guest

Use a file //dd1 DD sysout=(*,intrdr)write your JCL to this
file. Pl some one try this out.

Is This Answer Correct ?    7 Yes 2 No

How do you submit JCL via a Cobol program?..

Answer / raghavendra

Before doing this alll the JCl statements shud be written to
the file mentioned in DD1 by the cobol pgm

Is This Answer Correct ?    4 Yes 2 No

How do you submit JCL via a Cobol program?..

Answer / satish.m.s

Use a file //dd1 DD sysout=(*,intrdr)

Is This Answer Correct ?    2 Yes 0 No

How do you submit JCL via a Cobol program?..

Answer / 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

More JCL Interview Questions

How dummy is used in jcl?

0 Answers  


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

0 Answers  


How to pass values in jcl to cobol?

4 Answers   IBM, Infosys,


how many max steps can we use in a job? pls answer to my question

3 Answers   TCS,


How to send notification to multiple users through jcl???

8 Answers  


Please explain with syntax and an example, the Inrec fields and Outrec build in sort.

4 Answers   CTS, TCS,


i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?

6 Answers   IBM,


What is the DD statement for a output file?

3 Answers  


How to alter the parameters for the existing gdg?

0 Answers  


What is COND=ONLY ?

2 Answers  


is there any utility for restarting a particular step in jcl reply soon ?

5 Answers  


i have 10 steps in my jcl. -->if i want to execute my program from 5th step what i have to do? don't give //* in ur previous steps --> if i want to execute my program from 1to 5 steps only what i have to do?

2 Answers  


Categories