Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables to REXX PANEXIT

Status
Not open for further replies.

EduardoJacob

Programmer
May 12, 2003
2
PT
I'm experimenting calling REXX Panexit from ISPF Panel using syntax:

PANEXIT((var1,var2,...),REXX,RexxName)

(on OS/390 2.10)

It's working fine.
Now, I've read at "ISPF Dialog Guide and Reference" that it is possible to pass a dialog variable that contains a list of names of variables...

Does anybody did this before?
Thanks
 
I don't know if this is what you mean, but you could try;

)PROC
&varlist = 'MYVAR1,MYVAR2,MYVAR3,MYVAR4'
PanExit((&varlist),REXX,MyRexx)
)END


Then you can list what variables are passed to the exit via;

call ISPREXPX 'I'
say 'Number of vars passed = 'VARNAMES.0
do i = 1 to VARNAMES.0
say 'Variable 'i' = 'VARNAMES.i
end
call ISPREXPX 'T'


Which would return;

Number of vars passed = 00000004
Variable 1 = MYVAR1
Variable 2 = MYVAR2
Variable 3 = MYVAR3
Variable 4 = MYVAR4
 
Ahhh, I just re-read your post [blush] and see I didn't answer it - sorry.

I was thinking you could do something like;

&varlist = '&MYVAR1,&MYVAR2,&MYVAR3,&MYVAR4'

but that would just pass resolved values not what I think you want to pass.
 
Thanks to KiwiREXXDude.

His suggestion really worked
Putting in the panel:
&Var1 = 'value1'
&var2 = 'value2'
&varlist = 'var1,var2'
PanExit((&varlist),REXX,MyRexx)

The values 'value1' and 'value2' are really passed to the REXX.
Now, I was searching for this solution in order to try to circunvent the limitation of 255 chars for the varlist string that the ISPF manual says clearly it has
But because the &varlist is just expanded on his value
'var1,var2,...' so the limitation of 255 chars remains and so we are limited on the number of variables we can pass to the MyRexx
Using the &varlist method gives us no advantage on this issue

Bye




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top