× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



When you use a procedure, each procedure you call gets a message queue so
when you are using functions you need to include the name of the procedure
in the call.

If you go to www.think400.dk/downloads.htm you will find some software for
my trigger mediator. In that software you will find a service program
XVMSGF. This supports sending messages to the procedure. You can use as is
or extract the code but obviously better to externalize those kind of
functions. If you look at the screen source you will see all kinds of
examples of using it.

On Wed, Jun 24, 2015 at 4:42 PM, Englander, Douglas <
Douglas_Englander@xxxxxxxxxxxxx> wrote:


I have an ILERPG program with a DSPF. This program executes a function in
it that displays a window containing a subfile of a list of choices. The
window is defined with OVERLAY. Both the ILERPG program as well as the
function, use the program message queue for errors.

When I execute the function with a prototype of EXTPROC, it crashes
because it does not know the name of the message file (from the call
stack). I have tried in debug, hardcoding the MSGQ parameter for the
message queue to the name of the calling program, the service program, an
asterisk, as well as the name of the function. I chose those because they
are in the call stack. No matter what I do, the function crashes when it
writes the message file format.

When I change the prototype to use EXTPGM instead, and compile the
function code as a module, then execute a CRTPGM on the module, it does not
crash.

Does anyone know if it is possible to use a message queue for messages
within a function in a service program, where that function is called by an
ILE RPG program? If so, what is the value that is needed for the MSGQ
initialization? The MSGQ field I refer to is the one in the DDS associated
with the SFLPGMQ(10) keyword.

I assume that it works when I have the prototype set to EXTPGM because
that allows another entry in the call stack which works with SFLPGMQ
keyword. Is that assumption correct?

We are on V7R1.

Thank you,

Doug

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.