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 ? | 23 Yes | 2 No |
Post New Answer View All Answers
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
What is the purpose of dd * statement in jcl?
What is the difference between run mode and addressing mode?
What is the purpose of the dd keylen parameter?
what is the purpose of coding notify parameter in job statement?
Is their any set of rules for dd? Explain.
what is DD statement is used in JCL?
Explain the jcl exec statement?
Can I share my data with other jobs? How?
When space is allocated for an output dataset, what units can be used?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
Is it possible to left uncode disp?
Explain the function of //cntl statement?