Page 1 of 1

PASSING PARAMETER FROM ISPF TO REXX

PostPosted: Mon Nov 19, 2012 4:07 pm
by mehi1353
Hi,

I HAVE PROBLEM WITH PASSING PARAMETERS FROM MY ISPF PANEL TO A REXX PROGRAM.

FOR EXAMPLE, I WROTE A VERY SIMPLE PANEL TO READ A USERNAME AND SHOW IT A REXX PROGRAM.


MY PANEL CODE IS:

%COMMAND ===>_ZCMD                 
                                   
+USERID           ===>_UUSER   +   
                                   
)PROC                               
  VPUT (UUSER) SHARED
  &ZSEL = TRANS( TRUNC (&UUSER,'.')
  *, 'PGM(PASSSS)' )               
)END                     



AND THE RELEVANT REXX CODE(PASSSS) IS:

/* REXX */             
TRACE ON               
ADDRESS ISPEXEC         
"VGET (UUSER) SHARED"     
SAY 'THE USER IS:' UUSER


BUT IT DOESNT WORK AND always THE OUTPUT IS : ""THE USER IS: UUSER "" !!!

INSTEAD OF "SHARED",I TESTED "PROFILE".BUT THE RESULT WAS SAME.

COULD ANYBODY HELP?

BEST REGARDS,

MEHRDAD

Re: PASSING PARAMETER FROM ISPF TO REXX

PostPosted: Mon Nov 19, 2012 4:37 pm
by enrico-sorichetti
for REXX dialogs theres is no need for the VPUT and VGET

Re: PASSING PARAMETER FROM ISPF TO REXX

PostPosted: Mon Nov 19, 2012 7:24 pm
by mehi1353
Hi,

I tested without "VGET" in rexx program. but it still doesn't work.

do ia have to delete "VPUT" from my ispf panel ??


all the best

Re: PASSING PARAMETER FROM ISPF TO REXX

PostPosted: Mon Nov 19, 2012 8:20 pm
by Pedro
The relationship between the panel and the rexx program is not clear. You should be displaying the panel from within the rexx program.

Re: PASSING PARAMETER FROM ISPF TO REXX

PostPosted: Tue Nov 20, 2012 1:02 am
by NicC
1) PLEASE DO NOT SHOUT
2) Please use the code tags when posting code. You have been around long enough to know this and to know how to use them. I have encoded your code for you.
3) Try looking at the source for one of your local menus as they, more often than not, invoke Rexx programs.

Re: PASSING PARAMETER FROM ISPF TO REXX

PostPosted: Tue Nov 20, 2012 4:19 am
by Pedro
I cannot answer why it does not work. But frankly, I am surprised you got as far as you did.

From the ISPF Services manual, for SELECT PGM(somename):
This parameter must specify a name of a load module, load module
alias, or an entry point that is accessible by use of the LINK macro.

Since your rexx is none of those, I am surprised it got called at all.

I was not clear in my earlier post... you should invoke the rexx program first and from the rexx program you should use the DISPLAY service to invoke your panel (it should not have a zsel statement).

If, for some reason, you really insist to display the panel then call the rexx, you can pass your value as a parameter to the rexx.