IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CLIST calls REXX/ISPF - Variable definition


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Mar 11, 2008 5:13 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Wed Mar 12, 2008 5:10 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Mar 13, 2008 12:47 pm
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
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: 194
Location: India

PostPosted: Tue Mar 18, 2008 3:52 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Mar 18, 2008 5:29 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top