0 pts.
 CL programming, command keys
CLP
In a CL program, if I use a command like DSPUSRPRF that presents a screen to the user, and has F3 and F12 keys active, how do I detect the keys the user has pressed upon exiting the command? If I am using a display file in a CL program, I know I can check indicators IN03 or IN12, but this does not work with a command. How can I detect which keys the user has pressed?

Software/Hardware used:
ASKED: February 13, 2006  10:29 AM
UPDATED: November 29, 2009  12:33 PM

Answer Wiki:
when pressing F3/F12 on a commandscreen the message CPF6801 will appear in the joblog. The msgdta will hold F3 or F12 in the first 3 characters. In a CL pgm you can monitor for this message and checking the msgdta the following way : MONMSG MSGID(CPF6801) CMPDTA(F12) EXEC(***) where you can monitor also of course for F3 in the CMPDTA. ===================================================== F3 and F12 are defined in CUA as Exit and Cancel. After the DSPUSRPRF (or most any system command or panel) returns, call the QUSRJOBI API with format JOBI0600. Check the receiver variable offset 102 for Exit and 103 for Cancel. Tom
Last Wiki Answer Submitted:  November 29, 2009  12:33 pm  by  Jadima   0 pts.
All Answer Wiki Contributors:  Jadima   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _