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 happens when time=0 is given in jcl code. what happens when blksize=0 is given in jcl code. what is symbolic and overriding parameters and a example program.
Is there GOTO and SWITCH-CASE available in JCL ? Is IF-THEN-ELSE available in JCL also just like it is available for VSAM datasets under Model Commands category ?
How to find in aparticular step how many versions a paricular gdg base have?
I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK
oza017.myorg.emp has 100 records ,oza018.myorg.staff has 200 records but 50 are the common records in both files copy all the common records into oza017.myorg.xyz dataset
Explain about CBL/PROCESS statement syntax
Is there any command to check wether the ps file is in sorted order?
what is static and dynamic call with examples?
can we have more than one job in a single job card that is we are specifying only one 'job' statement in the jcl.
How to find out the number of records in a file using JCL
How to test thru JCL if any file(PS or VSAM) is empty or not. I do not want to use any COBOL prog or Ezytrieve and want to do using utility.
01 A. 10 B pic X(10). move spaces to A. move spaces to B. output in A & B