"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 03/29/2018 01:00:02
PM:
----- Message from Paul Therrien <paultherrien@xxxxxxxxxxxxxxxxxx>
on Thu, 29 Mar 2018 10:13:07 -0400 -----

To:

"RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>

Subject:

Re: interactive msg subfile

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?

The above suggestions are all appropriate, but the first thing I always
check is for the OVERLAY keyword. If you write the SFLCTL record for the
message subfile control record first, the OVERLAY keyword needs to be on
your main record on the display. If you write the message subfile control
record last, the OVERLAY keyword needs to be on the message subfile
control record.

If the above is correct, then look at the message in the job log and
display the message details. (Put your cursor on the message, press F1,
and then F9.) Check what is shown for the 'To program' and 'To procedure.'
Based on what you find here, you can use any of the methods from previous
posts to adjust, as needed, where the message is sent.

Michael Quigley
Computer Services
The Way International

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.