How to execute a set of JCL statements from a COBOL program?

Answers were Sorted based on User's Feedback



How to execute a set of JCL statements from a COBOL program?..

Answer / vishal

we can declare a record in file section and can pass the
statementa to that record as shown..

E.D
fole_control.
select jclfile assign to jcldd
file section.
fd jclfile
01 jcl_record pic x(80).

P.D.
mainpara.
open output jcl_record
move "//job job1, notify=&sysuid" to jcl_record.
move "//step1 exec pgm=pgm1" to jcl_record.
.......
.......
close jcl_record.

then route the file to internal reader INTRDR in jcl
as shown..
//step1 exec pgm=pgm1
//dd3 dd dsn.......
//jcldd dd sysout=(*,INTRDR)

(here the job will get submitted automatically FROM COBOL)

Is This Answer Correct ?    7 Yes 2 No

How to execute a set of JCL statements from a COBOL program?..

Answer / anoop

You can execute JCL from cobol programs.

Write the jcl statements into a file and open it in out put
mode.

Is This Answer Correct ?    8 Yes 12 No

Post New Answer

More COBOL Interview Questions

What is the difference between SEARCH and SEARCH ALL?

6 Answers   Cognizant,


wht is packed decimal in cobol

2 Answers  


when SE37 SB37 and sd37 occurs how to increase the volume , primary quantity and secondary quantity?

1 Answers   Hewitt,


In an EVALUTE statement is the order of the WHEN clauses significant?

4 Answers  


What is SSRANGE, NOSSRANGE ?

5 Answers  






What is the Purpose of Pointer in the string?

0 Answers  


is this below syntax correct? CALL 'subprg' using A,B Please help

2 Answers  


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

0 Answers   Infosys,


what is sync clause?

2 Answers   DELL,


How can we find out wether to declare the data items like Integer, Char,Comp? If comp types how can we decide wether it is Comp and Comp3.How it is? Please Explain... Cheers.

1 Answers   Syntel,


what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?

9 Answers   TCS, Tech Mahindra,


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

0 Answers   IBM,


Categories