How to pass values in jcl to cobol?
Answers were Sorted based on User's Feedback
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 |
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 |
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 do you check the syntax of a JCL without running it?
What is DYNAMBR in jcl?
What dd statement is used to supply the name of a dataset?
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?
How to print data of sequential file to Spool..?
what is JCL?
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' ?
Explain about Specifying compiler options in the PROCESS (CBL) statement
how do u send return code from cobol to jcl ?
I have 15 flat files. each record in the files have the monthly salary for 12 months with the employee number. Now I want to concatenate the 15 files such that for the employee numbers that are common the o/p file should have only one record and the salaries should be concatenated to that record. How can we do it with JCL?
i have job card like this //job ***** //step1 exec pgm=iebgener //sysut1 dd dsn=main.sss,disp=shr // dd dsn=main1.sss,disp=shr // dd dsn=main2.sss,disp=shr //sysut2 dd dsn=out1.mmm ,disp=(new,catlg,delete) dcb=( ) // sysin dd * like this what i have to do to skip dsn=main1.sss please giveme answer asap
What is a Proc ? why do we go for a Proc ? What are the types of procs?Can we have nesting in Procs ?