View previous topic :: View next topic |
Author |
Message |
mandar_57 Beginner
Joined: 13 Apr 2008 Posts: 5 Topics: 5 Location: Pune
|
Posted: Sat May 24, 2008 12:18 pm Post subject: How to pass parmeters from jcl to COBOL program |
|
|
Hi All,
I am a fresher having 3 mnths exp.
I have a query.
Can we pass parameters thru JCL to cobol program?
If yes, How?
Thanks,
Mandar _________________ M. Panse |
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Sat May 24, 2008 2:55 pm Post subject: |
|
|
Have you looked in the COBOL manual? |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sun May 25, 2008 5:35 am Post subject: |
|
|
Or searching this forum? Search on JCL AND parameter _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
nbdtrjk1 Beginner
Joined: 12 Apr 2007 Posts: 76 Topics: 41
|
Posted: Thu May 29, 2008 6:37 am Post subject: |
|
|
Below steps we can pass the values from JCL to COBOL pgm.
1. Through Sysin DD card
2. Through Pass Parameter
3. Using file read |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu May 29, 2008 7:08 am Post subject: |
|
|
nbdtrjk1 wrote: | Below steps we can pass the values from JCL to COBOL pgm.
1. Through Sysin DD card
2. Through Pass Parameter
3. Using file read |
Only number 2 can be done by JCL (Job Control Language) The other 2 are ordinary file reads. And OP stated PARAMETER. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
jctgf Beginner
Joined: 05 Nov 2006 Posts: 89 Topics: 36
|
Posted: Sat May 31, 2008 4:40 pm Post subject: |
|
|
u can do that by using the 'parm=' parameter in your jcl and the linkage section in your cobol program.
jcl:
Code: | //step1 exec pgm=pgm1,parm='hello' |
cobol program:
Code: |
linkage section.
01 parm.
03 parm-size pic s9(04) comp.
03 parm-value pic x(05).
procedure division using parm.
display 'my parm is=' parm-value.
stop run.
|
regards |
|
Back to top |
|
 |
|
|