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 |
What is catelog procedure and how many catelog procedure to use in one job?
How to find out the number of records in a file using JCL
Explain about SYSVAR
If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed irrespective of the return code from the previous steps. How can it be done?
How can we increment subscript and index?
We are aware of eliminating the duplicate records from outyput fiel using sort utility. Can we get the duplicate records in to another file in the Same sort utility?
What does a disposition of (NEW,CATLG,KEEP) mean?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
If Region=0k means What Happen?
At what stage, operator can change the class and priority of a submitted job?
A statement about PROCs is " In PROCs, Symbolic Parameters can be assigned on PROC and EXEC", BUT On which EXEC, (i) On the JCL's EXEC which is calling to PROC1. (Inside JCL, EXEC PROC1) (ii) or On the PROC's EXEC where it calls the PGM1. (Inside PROC, EXEC PGM=PGM1)
I have a PDS and want to omit few rows of all members of a PDS. How to do it?