Page 1 of 1

Keeping PFKEY assignment

PostPosted: Thu Mar 13, 2008 8:26 pm
by snuggiebug
I have developed an application that overrides the PF5 key and I use it for processing in the application. At the end of the application, I use VPUT to put the original value of PF5 back in the shared pool, but when the user splits the screen and comes back to the application, the PF5 assignment that I override is gone. How do I maintain the PF5 value that is overridden in the application, no matter if the user splits the screen or not?

Re: Keeping PFKEY assignment

PostPosted: Fri Apr 25, 2008 2:24 am
by snuggiebug
For anyone who is interested. I figured out the answer to my problem. To run a rexx program in which you are using PFkeys for processing, you can create an application and set the PFkeys to anything that you want and you will not disturb the default PFkeys that are defined in TSO. The code below checks the application, and if the application is not APRS, the program re-invokes itself with the new application in which I set new PFkeys that are independent of the default keys of TSO. The new PFkeys will only be used for the rexx program that you are executing.


ARG P4
parse source . . execname .
ADDRESS ISPEXEC
"VGET (ZAPPLID) SHARED"
IF ZAPPLID <> 'APRS' THEN DO
"SELECT CMD(%"execname P4") NEWAPPL(APRS) PASSLIB"
EXIT
END

CALL SET_PFKEYS

Re: Keeping PFKEY assignment

PostPosted: Fri Apr 25, 2008 7:08 am
by dick scherrer
Thank you for posting what you found.

It will help someone with a similar question later :)

d