Message subfile to load error messages

0 pts.
Tags:
Programming Languages
RPG
I am using message subfile to load error messages. I am calling a CL program to load and clear message subfiles. While clearing, I am passing the name of the RPG program to the CL program and the code is RMVMSG MSGQ(Program Queue Name) Clear(*ALL) But I am getting the message that message queue (which is the name of the RPG program) not found in library. Please advise.
ASKED: June 22, 2005  1:30 AM
UPDATED: June 24, 2013  7:38 PM

Answer Wiki

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

Hi,
have you already checked that this is not a library list problem because it seems you don’t specify the library in your clear statement.

If the MSGQ is owned by the program that calls the CLP to clear it , you may use *PRV as first parameter.

Hope it may help.

Regards.

===========================================================

The library list has no relationship to the problem. This is a ‘program message queue’, not an external message queue. The message queue only exists within the job. It’s not in a library.

The problem is that the message queue needs to be specified in the PGMQ() parameter instead of MSGQ(). The correct parameter value could be determined if the structure of the program or procedure calls was given, including program attributes, in particular ILE or OPM.

A reasonable guess to start is simply RMVMSG PGMQ(Program Queue Name) or RMVMSG MSGQ(*PRV).

Tom

Discuss This Question: 3  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
  • Cmasse
    Messages receive in a program are not in a MSGQ but in a PGMQ. try RMVMSG PGMQ(YOURPGM) or better RMVMSG PGMQ(*PRV) Christian.
    0 pointsBadges:
    report
  • JPLamontre
    Using a CL you add a level of execution. Why not using API ? If necessary, you can find a complete sample of DSPF with error subfile + the RPGLE program at http://jplamontre.free.fr/jpltools.htm then search JPL020
    0 pointsBadges:
    report
  • Openanewdoor
    For message subfiles, I Think most people are just using the ERRMSG keyword at the top of the DDS. As lony as an indicator is setting on the error message--the keyword does most of the work for you. A ERRSFL A 61 SFLMSGID(APP0079 etc...
    0 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