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 ?    22 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

What is the difference between sb37,se37,sd37 each?

9 Answers   TCS,


i have a string of 80 chars i want to replace 4th char with "a"?

3 Answers   CSC,


the command to open a dataset directly from the JCL instead of opening it separately using 3.4 option.

7 Answers   IBM,


I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can do this??

7 Answers   UST,


How do you create a temporary dataset? Where will you use them?

2 Answers   IBM,






Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

0 Answers  


how to solve u4038 abbend?........

3 Answers   Atos Origin, TCS,


how to count the number of members in pds?

2 Answers  


what is meant by jobtrac?

4 Answers   CSC,


How can you trap abends in the JCL?

3 Answers  


how can i use the parameters decalred in main pgm in sub pgm

2 Answers   TCS,


HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?

1 Answers   IBM,


Categories