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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

HOw can I get the negative sign while deduct high value from low value

1988


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

939


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

1016


What is an in line perform? When would you use it? Anything else you wish to say about it.

817


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

1943






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

7043


Explain about different table spaces.

844


how to move the records from file to array table. give with code example

2411


In COBOL, what is the different between index and subscript?

930


What is the Purpose of POINTER Phrase in STRING command in COBOL?

948


Can a Search can be done on a table with or without Index?

1034


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

912


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

1068


) How do u handle errors in BMS macro?

1606


How do define dynamic array in cobol.

841