Previous Topic: A Program That Signs the User off CA TPXNext Topic: A Program That Submits an Action Key


A Program That Reassigns PF Keys

You can use the variable &TAID to change user input for an application that uses non-standard PF keys. The following program displays a customized panel with the standard PF key values, accepts the user's input, and changes the &TAID entered by the user to one that the application accepts.

        DISPLAY CUSTMPNL       DISPLAY CUSTOMIZED PANEL 
        INPUT                  WAIT FOR USER ACTION 
        COMPARE &TAID,'PF1'    WAS PF1 ENTERED?
        BRANCH EQ,HELP         YES, USER WANTS HELP 
        COMPARE &TAID,'PF3'    WAS PF3 ENTERED?
        BRANCH EQ,END          YES, USER WANTS TO END 
        COMPARE &TAID,'PF7'    WAS PF7 ENTERED?
        BRANCH EQ,NEXT         YES, USER WANTS NEXT SCREEN 
        COMPARE &TAID,'PF8'    WAS PF8 ENTERED?
        BRANCH EQ,PREV         YES, USER WANTS PREVIOUS SCREEN 
           ... 
HELP    PF 9                   SEND PF9 INSTEAD OF PF1 
        BRANCH ANY,RETURN 
END     PF 12                  SEND PF12 INSTEAD OF PF3 
        BRANCH ANY,RETURN
NEXT    PF 11                  SEND PF11 INSTEAD OF PF7 
        BRANCH ANY,RETURN 
PREV    PF 10                  SEND PF10 INSTEAD OF PF8 
        BRANCH ANY,RETURN
            ...