How to execute a set of JCL statements from a COBOL program?
Answers were Sorted based on User's Feedback
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 |
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 |
Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?
7 Answers Bank Of America, Mind Tree,
IF I mention stop run in CICS what happens?
I want ALL jcl ERROR cods
i WANT ALL ERROR codes IN CICS and DB2
How can you get the ksds file records into your cobol program?
What is the maximum length of a field you can define using COMP-3 in COBOL?
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
What is the figurative constant in cobol?
What is report-item?
How much salary you are expecting? If they ask in an interview, what we have to tell?
6 Answers Tech Mahindra, Wipro,
how to refer the data field?
Can we use redefine clause in occurs clause?