View previous topic :: View next topic |
Author |
Message |
koolspark Beginner
Joined: 27 May 2010 Posts: 29 Topics: 13
|
Posted: Sat Jun 12, 2010 1:54 am Post subject: passing multiple numeric values through JCL PARM parameter |
|
|
hi,
I would like to pass 2 numeric values to a cobol program through JCL PARM parameter. my cobol declaration is shown below
LINKAGE SECTION.
01 VAR1.
05 VAR1-LEN PIC S9(4) COMP.
05 VAR1DATA PIC 9(2).
05 VAR2DATA PIC 9(2).
procedure division using var1.
my jcl step is as shown below.
//step1 exec pgm=cobpgm,parm=(10,20)
But, my cobol program is getting the first value only, and not reading the second value.
Please advise... |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Sat Jun 12, 2010 6:44 am Post subject: |
|
|
Worked OK for me, although I did account for the comma:
01 VAR1.
05 VAR1-LEN PIC S9(4) COMP.
05 VAR1DATA PIC 9(2).
05 FILLER PIC X.
05 VAR2DATA PIC 9(2). |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sat Jun 12, 2010 6:44 am Post subject: |
|
|
Try putting quotes around the parm _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Sat Jun 12, 2010 10:31 am Post subject: |
|
|
The PARM data is one field. It is not multiple "arguments".
You need to allow for the filler as superk has done. If you code it this way, both numbers must always be 2 positions. a value of 1,1 or 2,34 would not work. To use these, you would define an x(5) field and break it down in the code. _________________ All the best,
di |
|
Back to top |
|
|
koolspark Beginner
Joined: 27 May 2010 Posts: 29 Topics: 13
|
Posted: Sun Jun 13, 2010 11:30 am Post subject: |
|
|
Thanks Superk. It did worked.. |
|
Back to top |
|
|
|
|