× 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.



You need to include the procedure name.

If you are interested, I have a service program that encapsulates the
functions to do message subfiles instead of putting the code into every
program.

Please let me know if you are interested.


On Thu, Mar 29, 2018 at 7:13 AM, Paul Therrien <
paultherrien@xxxxxxxxxxxxxxxxxx> wrote:

In my programs where I have done the same thing as you are doing, the
PGMNAMQ is the main program (I set this variable value in the mainline
of the program with the *PROC value of the Program Status Data
Structure.) And I set the SND_StkCnt = 0.

So when the sendmessage sub proc runs it is pointing the the call stack
entry of the main program and the relative stack count of the message
queue is 0 (i.e. the message queue of the main program).

Paul

On 2018-03-29 09:24, Jay Vaughn wrote:

So I don't like these, but thats a different story.

I am required to put them in my interactive pgm.

Other developers write the following call to the SendMessage in their
interactive pgm using a subroutine.
I like procedures, so I put mine in a procedure. This is the ONLY thing
i
can see different between theirs and mine, but mine will NOT display the
message in the msg subfile at the bottom of the screen. If you view the
joblog, you see it there.
The snd_stkCnt is being set to 0, and I suspect this is what is tripping
me
up. Due to the fact that it is in a procedure ("mini pgm") instead of a
subroutine, the stack count is wrong. I tried setting to 1 with no luck.

Can anyone shed some light on this?

D SendMessage PR ExtPgm('QMHSNDPM')
D Snd_MsgId 7A
D Snd_MsgFil 20A
D Snd_Data 80A
D Snd_DtaLen 8B 0
D Snd_Type 10A
D PGMNAMQ 10A
D Snd_StkCnt 8B 0
D Snd_MsgKey 4A
D Error_Code 116A

and yes, the Program Name Que in the DSPF for the msgsfl is being set to
the program name of my interactive pgm... does this need to be taken one
step further and name the procedure name instead?
how would i do that?
--
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: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.