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
 

 

CLIST calls REXX/ISPF - Variable definition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
biswadeepghosh

New User


Joined: 03 Jan 2008
Posts: 14
Location: Pune

PostPosted: Tue Mar 11, 2008 2:51 pm    Post subject: CLIST calls REXX/ISPF - Variable definition
Reply with quote

I'm changing a CLIST program which calls ISPF panels to get data and then calls a REXX program passing the same data which is processed and displayed.

Whilst calling the REXX pgm i pass the variables like

PGM1 &VAR1 &VAR2 &VAR3.

Var1/var2/Var3 are populated in the ISPF panel called before PGM1 is called.

Now the problem i'm facing is if VAR2 is not populated, the Pgm1 picks up the data of Var 3 as of VAr 2 in the REXX pgm .

Can someone suggest ?

Can i assign default values to Variable taken as input from the ISPF screen ? if yes how ?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 11, 2008 5:13 pm    Post subject:
Reply with quote

VPUT VGET
Back to top
View user's profile Send private message
akhi007

New User


Joined: 30 Jan 2006
Posts: 35
Location: Richmond

PostPosted: Tue Mar 11, 2008 5:16 pm    Post subject: Reply to: CLIST calls REXX/ISPF - Variable definition
Reply with quote

Hi,

Verify whether values is getting populated into VAR1 VAR2 and VAR3 variables. Suppose if the value of VAR2 is spaces from the panel, then rexx will replace the value of VAR2 by VAR3.

For e.g, You are passing the following values,

VAR1 = "ABC"
VAR2 = ""
VAR3 = 123

CALL PGM &VAR1 &VAR2 &VAR3


PGM:

/*rexx */
parse arg v1 v2 v3

Say v1
Say v2
Say v3

here, result will be as follows

ABC
123
...

Inorder to avoid this, put a check for spaces before calling the rexx routine. If it is spaces, then pass some dummy value. This will solve the problem.
Back to top
View user's profile Send private message
biswadeepghosh

New User


Joined: 03 Jan 2008
Posts: 14
Location: Pune

PostPosted: Wed Mar 12, 2008 4:47 pm    Post subject:
Reply with quote

oops ! sorry but how to check for spaces in CLIST icon_sad.gif ... i'm really weak in tat .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Mar 12, 2008 5:10 pm    Post subject:
Reply with quote

That is the reason I suggested using VPUT / VGET. The variables keep the values assigned in the panel, so no need to worry if one or more are blank.
Back to top
View user's profile Send private message
biswadeepghosh

New User


Joined: 03 Jan 2008
Posts: 14
Location: Pune

PostPosted: Thu Mar 13, 2008 11:05 am    Post subject:
Reply with quote

Sorry not getting it

In the CLIST i am defining

ISPEXEC VGET (BG11,BG12,BG13,BG14,BG15)

The feilds which need to be populated in the ISPF panel

BG11 BG12 BG13 BG14 BG15 ( anyone could be blank)

Now whilst calling the REXX pgm these variables dont seem to have any data.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 13, 2008 12:47 pm    Post subject:
Reply with quote

No, they wouldn't have any value until you VPUT them first.

The variables in the CLIST which displays the panel are populated with whatever is entered into the panel, so VPUT them (usually use PROFILE) and in the REXX VGET them.
Back to top
View user's profile Send private message
biswadeepghosh

New User


Joined: 03 Jan 2008
Posts: 14
Location: Pune

PostPosted: Tue Mar 18, 2008 1:24 pm    Post subject:
Reply with quote

Thanks a lot .... it worked !
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Tue Mar 18, 2008 3:52 pm    Post subject: Reply to: CLIST calls REXX/ISPF - Variable definition
Reply with quote

may be delay reply. but instead of checking values in rexx/clist why can't you check in panel definition code it self.
Back to top
View user's profile Send private message
biswadeepghosh

New User


Joined: 03 Jan 2008
Posts: 14
Location: Pune

PostPosted: Tue Mar 18, 2008 4:03 pm    Post subject:
Reply with quote

are you saying to pass a default value if the feild is left blank ?.. im not sure of VER has this option ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 18, 2008 5:29 pm    Post subject:
Reply with quote

Quote:
may be delay reply. but instead of checking values in rexx/clist why can't you check in panel definition code it self.

Why check them in the panel, if a null value is assigned then a null value is assigned.

As the variables are used. possibly checked, in the REXX / CLIST anyway, why check them in the panel as well ?
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am


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