Q
Problem solve Get help with specific problems with your technologies, process and projects.

Has the user pressed PF3 to exit the query?

I have a RUNQRY command in a CLP. If the user chooses to PF3 (exit) and not execute the query, I'd like to exit the CLP. How can I determine if the user has pressed PF3 to exit the query?

When you press F3 or F12 on a RUNQRY prompt, a message CPF6801 is issued. Monitoring it with MONMSG enables you to find out that the user has pressed F3 or F12.

Example:

RUNQRY ??QRYFILE((FILE))
MONMSG MSGID(CPF6801) EXEC(DO)
/* F3 or F12 was used to exit the RUNQRY prompt */
ENDDO


Dig Deeper on FTP

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close