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

if we compile the cobol+ db2 program now ofter 5 years we need to compile again?

1 Answers   TCS,


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,


What is the DD statement for a output file?

3 Answers  


I have one GDG. Everyday One new version is being created.Now I want to split this created version in different files each having 1000 records. Here Problem is I don't know How many records will be there in new version of GDG? that's why I don't know How many Out files we need to use . Interesting??????????????

4 Answers   CTS,


What is the difference between primary and secondary allocations for a dataset?

8 Answers  






There is a procedure in A.B.PROCS(PROC1) (member name is PROC1) //PROCA... There is a call to a procedure PROCA from a JOB. //STEP01 EXEC PROCA ... Here "PROCA" in JOB refers to the actual PROC name or the member name of the PDS where this PROCA is stored.

2 Answers   Merrill Lynch,


What is the motivation behind coding class parameter in job statement?

0 Answers  


What is timing concept in mainframe?

0 Answers  


What does a disposition of (NEW,CATLG,DELETE) mean?

3 Answers  


How to execute 2nd and 4th steps among 5 steps in jcl proc?

0 Answers  


Can we change the LIMIT of GDG?

6 Answers   HCL,


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

0 Answers  


Categories