how can we pass parameters from JCL to cobol
subprogram...my requirement is i should not get data from
mainprogram but i need it from JCL directly
Answer Posted / abhijit saha
You can do it using SYSIN parameter in JCl and ACCEPT in
COBOL-
JCL using SYSIN
//STEP01 EXEC PGM=CBLPRGM
//STEPLIB DD DSN=SOMETIME.DEMO.LOADLIB,DISP=SHR
//SYSIN DD *
This is a single parameter from STEP01 and SYSIN
/*
Cobol Pgm which uses this JCl
DATA DIVISION.
WORKING-STORAGE SECTION.
..........................
01 SYSIN-PARAMETER pic X(80) value SPACES.
PROCEDURE DIVISION.
..........................
ACCEPT SYSIN-PARAMETER from SYSIN
| Is This Answer Correct ? | 25 Yes | 2 No |
Post New Answer View All Answers
Explain in DD statement what is the use of DCB parameter?
Explain how can values be passed from the job stream to an executable program?
What is use of restart and how to use it?
Why block size is multiple of lrecl in jcl?
What is NOTCAT ?
Are there any set of rules for the names of the steps used in a job? What are they?
Is their any limit for data sets?
What is the use of disp parameter?
How can return codes be tested before execution of a job step?
What does a disposition of (new,catlg,keep) for a dsn mean?
when can a job time-out occur? How to overcome that?
How can the submitting users racf authority be overridden in a job stream?
Is automatic restart possible in jcl?
what is the difference between JES3 and JES2?
How can an in-stream dataset be terminated?