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

in step1 of a jcl,disp=(mod,delete,delete) step02 exec pgm=ccc,cond=(0,le) will step02 be executed? i)never ii)always iii) iv)... i dont remember options

4 Answers   HSBC,


consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayed after the PERFORM is over? assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above

1 Answers  


how do you resolve for soc7 error

6 Answers   ACS, iGate,


can i sort packed decimal if i can tell the syntax

1 Answers   Barclays,


What is difference between Return Code, user completion code, Abend code and reason Code?

2 Answers   IBM, Satyam, Wipro,






How I sort the records in a file and copy the first 10 records to another file

5 Answers  


mainframe questions like basic&depth

0 Answers   TetraSoft,


Please explain with syntax and an example, the Inrec fields and Outrec build in sort.

4 Answers   CTS, TCS,


Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?

8 Answers  


What are the parameter in the job card wihtout which job won't run........

10 Answers   IBM,


What is the improvement to COND= in the latest version of MVS?

3 Answers  


What is the meaning of the following declaration : DCB=BLKSIZE=, What is the difference between above declaration & not specifying DCB at all for a output file?

1 Answers  


Categories