how to submit a jcl by cobol program.
clear me with an example.
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is length is cobol?
For rewrite, why is it mandatory that file needs to be opened?
can we use the two 01 level in file discription ?
What are the pertinent COBOL
how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?
Can we use goto statement in inline_perform ?
Name the divisions in a COBOL program ?
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?
Hi All, how is sign is stored in S9(17) comp-3 variable. Answer with an Example will be of great help.
HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?
How is sign stored in Packed Decimal fields and Zoned Decimal fields?
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be