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

What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

717


how can i see junk values in dclgen or in hostvariable of comp ?

2546


What is comp-1 and comp-2?

765


How you can read the file from bottom?

660


What are the various section in data division and briefly explain them.

700






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

780


What type of SDLC u followed? Why?

1521


Why would you use find and get rather than to obtain?

692


what is the difference between COBOL2 AND COBOL390?

2455


What is the LINKAGE SECTION used in COBOL?

892


what is difference between cobol and cobol/400

21569


What are various search techniques in cobol? Explain.

650


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

710


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2724


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1119