how to submit a jcl by cobol program.
clear me with an example.

Answers were Sorted based on User's Feedback



how to submit a jcl by cobol program. clear me with an example...

Answer / leena_kulkarni

You just write out your JCL syntax to a file and assign it
to the internal reader to be automatically fired off when
you close the file.

SYNTAX:
When you close file, write down the below line.
//SYSUT2 DD SYSOUT=(*,INTRDR)

Is This Answer Correct ?    5 Yes 3 No

how to submit a jcl by cobol program. clear me with an example...

Answer / shriram supalwar, dharmabad

Submission of JCL Job from COBOL program
JOB:

//Jobcard
//STEP1 EXEC PGM=MAINPROG
//DD1 DD DSN=RAM.TEST,DISP=(SHR)
//JCLDD DD SYSOUT=(*,INTRDR)

COBOL PROGRAM:
(MAINPROG)

IDENTIFICATION DIVISION.
PROGRAM-ID. RAM.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INFILE ASSIGN TO JCLDD
DATA DIVISION.
FILE SECTION.
FD INFILE.
01 JCL-REC PIC X(20).
PROCEDURE DIVISION.
OPEN OUTPUT INFILE.
MOVE "//TYAWJKG JOB (A123, RAM)' TO JCL-REC.
MOVE "//STEP1 EXEC PGM=IEFBR14' TO JCL-REC.
MOVE "//DATA1 DD DSN=A.B.C,DISP=OLD' TO JCL-REC.
CLOSE INFILE.

correct me i am wrong......

Is This Answer Correct ?    1 Yes 0 No

how to submit a jcl by cobol program. clear me with an example...

Answer / suresh ramaiyan

Let us the program is PGM1. Below is the JCL for running
the PGM1.

//STEP1 EXEC PGM=PGM1
//INSUB DD SYSOUT (* INTRDR)

In the program define INSUB as file (should have a LRECL of
80). Write all the JCL codings into INSUB file.

When you close the INSUB file, the job will be submitted to
JES automatically.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL Interview Questions

What is length is cobol?

0 Answers  


For rewrite, why is it mandatory that file needs to be opened?

0 Answers  


can we use the two 01 level in file discription ?

6 Answers  


What are the pertinent COBOL

0 Answers   IBM,


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  






Can we use goto statement in inline_perform ?

5 Answers   IBM,


Name the divisions in a COBOL program ?

7 Answers  


Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed to 4 characters) and forgot to change the DCLGEN in COBOL program, what will happen during the execution of code? If the program Abends then what will be the error? If it doesn't abend then hpw the error can be catched?

5 Answers   IBM,


Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help.

5 Answers   EDS,


HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?

2 Answers  


How is sign stored in Packed Decimal fields and Zoned Decimal fields?

6 Answers   ABC, HCL, TCS,


Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be

7 Answers   TCS,


Categories