Page 1 of 1

Using NEWAPPL

PostPosted: Thu Apr 10, 2008 2:16 am
by snuggiebug
I was informed that I could use NEWAPPL on a panel to be able to override PFkeys without disturbing the default application that house the mapping of the keys. I do not have any example of this. Do anyone have any examples of doing this or maybe can explain what steps I can take to implement this?

Re: Using NEWAPPL

PostPosted: Fri Apr 25, 2008 2:26 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