How to pass values in jcl to cobol?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In sms datasets, what is the function of the dd avgrec keyword?

650


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

7600


How to submit jcl through a cobol program?

676


define cond parameter in jcl?

771


Can we call instream to catalog and catalog to instream?

681






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

1579


what is the use of IEBGENER utility?

654


which parameter is use to declare the name of dataset in dd statement?

730


What is notcat 2 - gs?

932


what is use of disp parameter in dd statement?

659


What is catelog procedure and how many catelog procedure to use in one job?

7443


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

713


I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?

8669


When space is allocated for an output dataset, what units can be used?

745


Is condition checking possible in jcl? If yes, how?

735