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



how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data ..

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

how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data ..

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

how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data ..

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

how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data ..

Answer / vishal sinha

>>Through PARM parameter
>>Through INSTREAM DD statement

Is This Answer Correct ?    13 Yes 0 No

how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data ..

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

Post New Answer

More JCL Interview Questions

What is the function of the dd mgmtclas keyword in sms datasets?

0 Answers  


How to compare 2 files using File-Aid?

1 Answers   IBM,


01 A. 10 B pic X(10). move spaces to A. move spaces to B. output in A & B

2 Answers   Perot Systems,


When we give TYPERUN = SCAN , what are the syntax errors we get?

5 Answers   Kanbay,


What is the motivation behind coding class parameter in job statement?

0 Answers  


JCL Example: // //RUNJCL JOB CLASS=5,MSGCLASS=6,NOTIFY=&SYSUID //STEP01 EXEC PGM=IEFBR14 // .. .. If this JCL will run or it'll throw the ERROR?

4 Answers   HCL,


What all are the changes to be made in JCL so as to do testing?

2 Answers   TCS,


what is JCL?

0 Answers  


What are SD37, SB37, SE37 abends?

4 Answers  


If I update one or more members in a pds in the step 1, how can I reach these new contents to be used in the step 2 of the same job? To start a new job via intrdr is not satisfactory, because I must solve this problem in one job.

2 Answers   IBM,


In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?

14 Answers   Cap Gemini, Cognizant, JPMorgan Chase, TCS, Xansa,


Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You

0 Answers   IBM,


Categories