CL programming, command keys

pts.
Tags:
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following