View previous topic :: View next topic
|
Author |
Message |
unna
New User
Joined: 15 Oct 2004 Posts: 17
|
|
|
|
Hi,
When we'll be using PARM in Programs ?
Is there any particular sectionn where we have to use PARM?
If we are using PARM in programs should we also use in the respective
JCL?
HOw PARM will work when used in JCL?
Thanks in advance. |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
Hi Unna,
When you need to pass any data from cobol to JCl generally we go for SYSIN or PARM.
PARM is coded with the EXEC statement in the JCL and the cobol program requires a linkage section. |
|
Back to top |
|
|
lramani
New User
Joined: 03 Nov 2004 Posts: 21 Location: NOIDA, India
|
|
|
|
Hi Unna,
The parm receiving field and the length needs to be specified in linkage section.
Also the procedure division should have the USING in it.
So for example if the JCL had something like this:
//ABC EXEC PGM=XYZ,
// PARM='This is a Parmeter etc etc.....'
In cobol u wud have
LINKAGE SECTION.
01 PARM-VAL.
05 PARM-LGTH pic S9(4) comp.
05 PARM-DATA-PASSED pic X(80).
PROCEDURE DIVISION using PARM-VAL.
I hope this is what u wanted to know...let me know if u need more info. |
|
Back to top |
|
|
unna
New User
Joined: 15 Oct 2004 Posts: 17
|
|
|
|
Thank you lakshmi,
You replied exactly what i needed. |
|
Back to top |
|
|
|