View previous topic :: View next topic
|
Author |
Message |
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 219 Location: USA
|
|
|
|
Hi,
I am displaying a panel which has a couple of variables. I am setting default values to them in the )INIT section. The Panel is being displayed with the proper values successfully. Once the user changes those varialbes and hits enter, the next REXX program invocation finishes and comes back to the panel, the variables are restored to the default values from the )INIT section.
I understand that this is because of the initialization in the )INIT section.
What is the best way to keep the variables to what user changes. The default values should only be displayed once that is when the first time the panel is displayed? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Code: |
)INIT
If &var1 = &z
&var1 = 'default' |
|
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 219 Location: USA
|
|
|
|
Hi Pedro,
Thank you for your response. Sorry for getting back late.
Are you saying I should code like below?
My 2 variables are var1, var2. var1 stays the same as user's input, howeverd var2 reverts to its default value 'P' from )INIT section after Rexx is called from the ISPF dialog.
Code: |
If var2 = &z
var2 = 'P'
|
Let's say the user entered 'C' for var2 and hit enter, it will remain 'C' after the Rexx is done running its piece? Because this is what I am looking for to happen.
Appreciate your help. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
AFAICR there should be a REINIT and a PROC section where you could process and store (VPUT) variables. It's been a long time ago. |
|
Back to top |
|
|
|