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 ? | 22 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 |
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
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
how do you resolve for soc7 error
can i sort packed decimal if i can tell the syntax
What is difference between Return Code, user completion code, Abend code and reason Code?
How I sort the records in a file and copy the first 10 records to another file
mainframe questions like basic&depth
Please explain with syntax and an example, the Inrec fields and Outrec build in sort.
Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?
What are the parameter in the job card wihtout which job won't run........
What is the improvement to COND= in the latest version of MVS?
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?