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

Preserve changes to ISPF Panel Variables


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 219
Location: USA

PostPosted: Thu Aug 15, 2024 7:33 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Thu Aug 15, 2024 11:17 pm
Reply with quote

Code:
)INIT
If &var1 = &z
   &var1 = 'default'
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 219
Location: USA

PostPosted: Mon Dec 09, 2024 11:32 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1334
Location: Bamberg, Germany

PostPosted: Mon Dec 09, 2024 11:56 pm
Reply with quote

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
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 2
No new posts can an ISPF appl save user changes in... TSO/ISPF 14
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top