View previous topic :: View next topic
|
Author |
Message |
shivadravid
New User
Joined: 16 Jan 2014 Posts: 2 Location: India
|
|
|
|
I have a requirement in REXX which is similar to RETP command in that when the REXX is called it will display a popup panel with list of commands as options and the user selects the desired option and the popup closes and the selected option is displayed in the command line, I did the coding till user selects the option and stored the selected option in a variable once the popup panel closes,now i want to display this variable in command line as RETP does, Any help is appreciated!!!! |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
You should not post the same topic on multiple forums. Which topic do you want locked/deleted? This one or the one on 'another' forum? |
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 154 Location: Kuala Lumpur
|
|
|
|
Hi Shiva,
Have you try to assign value to "ZCMD" system variable? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
Have you try to assign value to "ZCMD" system variable? |
I suggested that on the other forum - one of the reasons for not posting across forums - wastes everybody's time.
I then tried it myself - it does not work. I guess zcmd get initialized on redisplay of the panel. And for what he wants a selection from a menu panel would be far more appropriate, standard, understandable and reasonable. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Update: having got back to work after lunch I did a little experimtent and you can assign a value to ZCMD and have it displayed. My original test was using an existing panel and that was initialising ZCMD in the INIT section. However, pressing enter did not get the error that I was expecting (unknown command) but continued processing the rexx program that displayed the panel. Experiments continue. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
You did not say from where you are executing your rexx program from. My experience is that you will need code within the calling panel.
1. in the exec, VPUT myvar SHARED
2. in the )INIT section of the panel:
Code: |
VGET myvar SHARED
IF (&myvar &= &z)
&ZCMD = &myvar |
|
|
Back to top |
|
|
shivadravid
New User
Joined: 16 Jan 2014 Posts: 2 Location: India
|
|
|
|
Nic,
Sorry for the redundancy caused, i used ur menu suggestion and it worked as expected, but still i want to know whether we will be able to return a value to the command line from rexx
Thanks again for ur valuable suggestions!!! |
|
Back to top |
|
|
sureshpathi10
Active User
Joined: 03 May 2010 Posts: 154 Location: Kuala Lumpur
|
|
|
|
Yes Mr. Shiva,
ZCMD is available in your REXX program also, only if you use VGET & VPUT in your panel.
So, if you perform as Mr. Pedro suggested, you will get it done. |
|
Back to top |
|
|
|