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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define static linking and dynamic linking.

658


How many bytes S(8) comp field occupy and its maximum value?

1624


how do you reference the fixed unblock file formats from cobol programs

698


Explain what you understand by passing by value.

685


how do you reference the variable unblock file formats from cobol programs

734






Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

619


Can we redefine the field of x(200) to less than 200?

812


Discuss about changing dataset name in proc.

757


What is a report item?

733


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


What are the cobol coding sheets?

657


Write the code implementing the perform … varying.

637


how to refer the data field?

1797


In COBOL programming, what is PERFORM? What is VARYING?

666


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1015