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

System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

0 Answers   Amdocs,


What happens in the background of spool when we submit a job for compilation and execution... This is a recent question in ibm...Kindly help me.....

3 Answers   IBM,


What is R-mode and A-mode?

3 Answers   TCS,


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


hie everyone.i just completed my b.tech in electronics and joined mainframes course.am i doing right course for my better future?please help me with your suggestions.ill be very thankful to you guys.

2 Answers  






i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?

5 Answers   HCL,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(9) VALUE SPACES. 01 WS-VARN REDEFINES WS-VARX PIC 9(9).

8 Answers  


A table has two indexes defined. Which one will be used by the SEARCH?

0 Answers  


How to pass return codes from cobol to jcl?

5 Answers  


What is binary search?

3 Answers  


I want to declare a field with data type Double in my COBOL program. how shall i do that ?

5 Answers  


describe 805 error

6 Answers   DELL,


Categories