MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

passing multiple numeric values through JCL PARM parameter

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
koolspark
Beginner


Joined: 27 May 2010
Posts: 29
Topics: 13

PostPosted: Sat Jun 12, 2010 1:54 am    Post subject: passing multiple numeric values through JCL PARM parameter Reply with quote

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
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Sat Jun 12, 2010 6:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sat Jun 12, 2010 6:44 am    Post subject: Reply with quote

Try putting quotes around the parm
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Sat Jun 12, 2010 10:31 am    Post subject: Reply with quote

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
View user's profile Send private message
koolspark
Beginner


Joined: 27 May 2010
Posts: 29
Topics: 13

PostPosted: Sun Jun 13, 2010 11:30 am    Post subject: Reply with quote

Thanks Superk. It did worked.. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group