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

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

1 Answers   HCL,


what is ASRA, AEY9?

2 Answers   IBM,


How many divisions we have in Cobol ?

4 Answers   Wipro,


whats the disadvantage of search all over search?

4 Answers   Patni, TCS,


What is report-item in COBOL?

0 Answers   Arigo Infotech,






wht is the diff b/w if and evaluate stmts ?

2 Answers   DELL,


What is the problem of ordered sequential files access?

0 Answers  


I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."

1 Answers  


how do you reference the rrds file formats from cobol programs

0 Answers  


In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.

1 Answers  


is it possible to declare index in cobol program? if it is not why its tell me pls

3 Answers  


How is sign stored in a COMP field ?

3 Answers   Accenture,


Categories