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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / squid
You could use PARM on the EXEC statement and get values
from JCL in the Linkage Section.
| Is This Answer Correct ? | 23 Yes | 1 No |
Answer / kalyani
In three ways we can pass the data from JCL to COBOL
1. By specifying in the PARM parameter
2. Sysindd *
3. Through files we can pass
i.e.,
//disk1 dd dsn=oza047.cobol.file1
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / vishal sinha
>>Through PARM parameter
>>Through INSTREAM DD statement
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / muttaiah
Hi All,
Please try to understand the Question here.
They want to pass data from JCl to cobol subprogram not to
cobol program.
The above answers are used in case of passing data from JCL
to cobol.
Can someone answer the question correctly
| Is This Answer Correct ? | 0 Yes | 0 No |
Is stepname is a MUST and should be unique also for each JOBSTEP ? or system can supply the stepname for a step which is not given a name by the programmer ?
There are 5 steps in a Job. How to bypass the first step by making use of only COND Parameter and not using any Restart and IF/THEN/ELSE parameter?
When we use conditional statement in JCL using if-then-else-endif, IF statement is true, the step is bypassed or executed?
what is use of dcb parameter in dd statement?
What is the difference between a PDS member and a GDG Generation ? Is it only this, that with a generation we can use +1, 0, -1 etc while with PDS member we can not ?
what is the use of JCL?
why do we use file-aid wht r the adv of using file-aid thn in ispf
How to release a JOB (from the input queue) held by TYPRUN = HOLD ? and how to see the installation default time after which a JOB will be automatically released ? How to see the list of currently HELD JOBS ?
What is the differentiation between TRK,cyl, and Bytes... how they can be connected??
what is the general use of PARM? Give an explanation about the system defined parameters that could be passed through this PARM like XREF,LIST,LET,APOST,RENT etc..
I found in one of the jcl, gdg version being mentioned as : abc.def.ghi(-0) Can anyone tell me how referring the version as (-0) is different from referring it as (0)
What do you do if you do not want to keep all the space allocated to a dataset?