How to pass values in jcl to cobol?

Answers were Sorted based on User's Feedback



How to pass values in jcl to cobol?..

Answer / madhavansvce

In JCL we can pass value in parm parameter and received in
cobol in the linkage section by using length and data fields
to be defined in cobol.

Is This Answer Correct ?    33 Yes 4 No

How to pass values in jcl to cobol?..

Answer / muttaiah

We can pass data from JCL to Cobol in 3 ways.
1. SYSIN: Normally and using files
2. Parm Parameter in Exec stmt


1. Sysin: Using this we can pass large amount of data. The
data passed using sysin will be accepted in cobol using
accept statement in procedure division.

//sysin dd *
adbcde
/*

or

//sysind dd dsn=<filename>,disp=shr

2. Parm: The parm parameter in Exec is used to send 100
char's of data from jcl step to cobol. This is accepted in
cobol usign linkage section. LInkage section should be
coded with Lenght and data fields.

//Stepname exec pgm=<PGManme>,parm='100 chars max'

Hope this will give you a clear picture than the other 2
answers.

Is This Answer Correct ?    23 Yes 2 No

How to pass values in jcl to cobol?..

Answer / rekha

We can pass the data from JCL to COBOL
By using SYSIN statement or
By using PARM parameter.

Is This Answer Correct ?    22 Yes 3 No

How to pass values in jcl to cobol?..

Answer / ayyappa

PARM,SYSIN,Files,DB2 Tables,

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More JCL Interview Questions

which are the parameters mandatory in job card ?

4 Answers   Accenture,


For how long a job can be executed continuously in a mainframe ?

4 Answers  


What is STEPLIB, JOBLIB? What is it used for?

2 Answers  


I have a JCL with 10 steps, want to execute first 5 steps only, what are ways of doing it?is it possible to control through JOB card?

5 Answers   iGate,


how can we pass external data to instream procedures

5 Answers   IBM, Infosys, Ocwen,


I have a COBOL program that Accepts some input data. How do you code the JCL statement for this? ( How do you code instream data in a JCL? )

9 Answers  


what is DSN in JCL and what are the parameters to declare the DSN?

0 Answers  


How to ALTER the name of a GDG ?

2 Answers   IBM,


if in a job, region is mentioned in both jobcard and in step then which is cosidered at the step level? A job has region 4k in jobcard and step1 with region 0k and step2 with 16k, then what is the region allocated for the entire job? what is the region step1 takes? what is the region step2 takes?

4 Answers  


how to put a dependency on job in jcl using opc scheduler?

1 Answers   CTC,


Explain about ISPF/TSO Commands

0 Answers  


Describe the various parameters utilized in the creation of a gdg?

0 Answers  


Categories