“Command prompting ended when user pressed F12″

320 pts.
Tags:
CLP
RPG
I have a CL that calls a RPG selection subfile pgm. If the user presses F12 during the selection process, I want to send a message to the user similar to the one shown in the subject line of this post. I have experimented with various settings of a SNDPGMMSG command from the CL but can't seem to get it right. Any suggestions as to how to set the parameters correctly to achieve my desired result?
ASKED: March 30, 2006  10:39 AM
UPDATED: December 3, 2009  6:10 AM

Answer Wiki

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

Have you tried sending the message from the RPG program using QCMDEXC?

Discuss This Question: 2  Replies

 
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
  • Ayahel1
    I have a program doing the same thing from a CL: SNDPGMMSG MSGID(CPF6801) MSGF(QCPFMSG) MSGDTA('F12') TOPGMQ(*PRV) MSGTYPE(*ESCAPE) Notes ----- 1. The CL that calls the RPG should get some kind of indication from the RPG program that the user presses F12 so it will know to issue this CPF6801. 2. If this is a CLLE program, you may need to set the TOPGMQ parameter to something else (*CTLBDY or *PGMBDY) because in ILE environment the *PRV will not always send the message to where you want. 3. The command above will send an escape message CPF6801 to the calling program. The action taken by the calling program depends on the way the CALL (your CL) is monitored. If there is a MONMSG in the calling program, the user may not get your message at all. Maybe the best is to issue the message to *EXT so the user will get a break message to his screen.
    0 pointsBadges:
    report
  • TomLiotta
    What exactly do you want to do? Do you have a display file with a message subfile? If not, what do you have that can handle messages? Normally, you just send a message to whatever program has the display file open and the message subfile shows the messages automatically. That's why we use message subfiles. Or are you calling a CL program from a standard command line or a command line on one of your menus? Then send the message to the *EXT (the external) message queue of the job or to the message queue of the *PRV (the previous) program of the CL program in the call stack. The *PRV program would be in charge of any messages. If it displays its messages, then it'll show up. You might not have any control over it. Nevertheless, what exactly do you want to do? You described a message in your text, but you probably know that there are many times when you cancel a command with <F12> and that message doesn't show up. You'll need to describe the circumstances that you want to handle. Tom
    125,585 pointsBadges:
    report

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