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

how to access the file from prodution from changeman tool and to submit a file to production

1 Answers   IBM,


How to covert given string into ASCII value in COBOL/MF COBOL

3 Answers   CTS, IBM, iFlex,


can we use reference modification an arry.

1 Answers  


COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.

7 Answers   HCL,


SIGN TRAILING SEPARATE field occupy ?

3 Answers  


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

0 Answers  


Difference between cobol and cobol-ii?

0 Answers  


how to display the dataset information?

2 Answers  


Whats the difference between search & search ALL?

3 Answers   IBM,


how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)

6 Answers  


In COBOL "BEFORE" advancing is there or not ?

3 Answers  


How To move a value to an array using move verb?

3 Answers   IBM,


Categories