when the user enters the panel this info will be displayed and he can change it to his choice
Now I want to override the data in the PS with what ever he enters here(his choice) so that next time if the same user into panel last entered data has to be populated
Data in the PS file I gave as
xxxxx hsjdhakdh ahdjkahdf
Please use the code tags when presenting code and data or anything else that needs a fixed pitch font or needs to retain formatting.
Does you input DATASET (not file) have only one record? If it does then you do not need a stem to store the data and you need ony tell EXECIO to read one record - this would be placed in variable REF1 (in this case).
If you always want to use the user values then on the first use simply do not take values from a dataset but get them from the users profile (VGET) before displaying the panel. They will not be there the first time so just put blanks. When the user populates them and presses enter then save them in to his profile (VPUT) ready for next time.
So you want to overWRITE not overRIDE? Is there just the one record? If so just write it. But that means the previous record is destroyed and, although it may not be needed NOW a rerun situation may need it so you should write the new values to a new dataset.
Yes Nic. I don't need the previous record in PS once I come out of panel.
Once I come out and enter again, panel should hold new value from PS.
Can you please tell me how can I move the VGET values to PS with some example.
I mean how to overwrite the existing record in REXX.
Ok to answer our original question, when using a dataset to store values you could do this:
"ALLOC DD(REFFIL) DA('"PREVIN"') SHR"
"EXECIO 1 DISKR REFFIL (FINIS)"
pull module newdsn oldddsn .
Address IspExec "Display panel(whatever)"
if rc=0 then do
queue module newdsn oldddsn
"EXECIO 1 DISKW REFFIL (FINIS)"
Using variables stored in the ISPF profile could be done like the following. Note that you might run into problems with APPLID, depending on how you start the program. As Nic says, you really must read those manuals.
"vget (module newdsn oldddsn) profile"
if rc=0 then "Vput (module newdsn oldddsn) profile"