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 / 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 / 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 ?    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 use of symbol // in jcl?

0 Answers  


which utility is used to update pds?

1 Answers   IBM,


What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?

0 Answers  


how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?

0 Answers   IBM,


what EXEC statement is and what is the syntax of EXEC statement used in JCL?

0 Answers  






How to do automated restart when a job abend?

0 Answers  


I have a jcl which is using 2 data sets i want to override those data sets. how can i override the files within the JCL. Give me the syntax. Make sure that it is not calling any Proc.

1 Answers  


The maximum number of steps in a job?

4 Answers  


I have a File that has duplicate records. I need only those records that occur more than thrice.

3 Answers  


What is COND=ONLY ?

2 Answers  


Explain the function of the dd dcb keyword?

0 Answers  


List some valid operation codes in JCL

3 Answers  


Categories