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

How does IDMS insure data integrity?

1 Answers  


can anyone explain me the concept of COMP-4 PLEASE??

2 Answers  


how to transfer the file from pc to mainframe??

5 Answers   TCS,


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.

0 Answers  


how we can reverse the string in the cobol for example satheesh can be reveresed as hseehtas

3 Answers   IBM,


what is the difference between Plan & package?

1 Answers   IBM,


The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


Have you used comp and comp-3 in your project? And how?

0 Answers   IBM,


what is sysncpoint?

1 Answers   IBM,


What does the IS NUMERIC clause establish ?

2 Answers  


if you give cylinder(1,1)how many cylinders it will be allocate?

3 Answers   Hewitt,


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  


Categories