Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

EXEC with multiple parameters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ovasquez

New User


Joined: 11 Dec 2005
Posts: 12
Location: Lima-Per?

PostPosted: Fri Aug 11, 2006 3:45 am    Post subject: EXEC with multiple parameters
Reply with quote

Can have multiple parameter in EXEC of JCL?

Exampl?:
JCl
=====
//...
//STEP001 EXEC PGM=PROG1, PARM=('VAL1','VAL')
//...

PROG1
======
...
LINKAGE SECTION.
01 VAR1 PIC X(30).
01 VAR2 PIC X(10).

PROCEDURE DIVISION USING VAR1 , VAR2.
DISPLAY 'VALUE1 ', VAR1
DISPLAY 'VALUE2 ', VAR2.

...

But display:
VALUE1 VAL1,VAL2
VALUE2
Why?

How display
VALUE1 VAL1
VALUE2 VAL2


Thanks!!!
Back to top
View user's profile Send private message

Gautam512

Active User


Joined: 05 Oct 2005
Posts: 309
Location: Vizag / US

PostPosted: Fri Aug 11, 2006 4:19 am    Post subject: Re: EXEC with multiple parameters
Reply with quote

hi,
yes we can have.

regarding display can you be a bit more clear about ur question...
Back to top
View user's profile Send private message
ovasquez

New User


Joined: 11 Dec 2005
Posts: 12
Location: Lima-Per?

PostPosted: Fri Aug 11, 2006 4:28 am    Post subject:
Reply with quote

I'd like display parameters :
DISPLAY 'VALUE 1 :', VAR1
DISPLAY 'VALUE 2 :', VAR2.

But display(in spool):
VALUE 1 :VAL1,VAL2

y don't display:
VALUE 1 :VAL1
VALUE 2 :VAL2

Why?

What is mistake in my programer?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Aug 11, 2006 6:12 pm    Post subject:
Reply with quote

Hi Ova,

You're almost there. Just one small correction:

Instead of
Code:

LINKAGE SECTION.
01 VAR1 PIC X(30).
01 VAR2 PIC X(10).

Use this:
Code:

LINKAGE SECTION.
01 parm-ip.
05 parm-len pic 9(004) comp.
05 VAR1 PIC X(30).
05 parm-comma pic x.
05 VAR2 PIC X(10).

The parm fild requires a def for the parm length that's supplied by the sysyem. Also the comma is also presented to your pgm so you have to define it (you could use FILLER).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us