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



Hi Terry,
 
First thing first:  I'm using a web e-mail system, so your source code will 
come back "unformatted."  I've stripped the source code out.  It looked fine to 
me.  
 
Since yours is an interactive program, I better understand what you're trying 
to do.
 
The call stack counter used in the trigger program (SMSTACK) should be set to 
1, because you want to send the nessage to the program queue that is 1 call up 
from the current program. (There's a possibility that there is an intermediate 
program between your interactive program and the trigger program... if that's 
the case, the call stack counter should be set to 2.  I'd have to set a trigger 
program and see to be sure about that!)
 
The program that initiated the trigger should have its call stack counter 
(RVCSTACK) set to 0, because you want to receive the message from the message 
queue on the current call stack entry parameter (usually set to '*').

Are you using a "message subfile" in your calling program to display the error? 
 If so, you should not have to use the QmhRcvPm API... the operating system 
will automatically read the program queue and place it in the message subfile 
for display.  Look for an example of a "DDS message subfile" (without the 
quotes) on Google.com.  You will need to use the QmhRmvPm API to remove the 
messages after you've viewed them.

Think of the relative positions of the program sending the message and the 
program receiving the message.  The call stack always indicates the number of 
entries UP the stack, regardless of whether it is a send or a receive program 
message.
 
You might want to check out the API info under the Programming link at:
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm
 
You're real close... let me know if you need further explanation.
 
William
date: Wed, 19 May 2004 17:01:13 -0700
from: "Terry Nonamaker" 
subject: RE: Problems using api's qmhsndpm amd qmhrcvpm

Thanks for responding William Washington.

This is an interactive program which does the update, which fires the
trigger. I want the message to come back to my program so I can display
it as an error.

I'm not sure quite what happened, but my attachments turned into
whatever it was you received. Although they did come back fine for me.
They were just 
a txt file.

I did try what I think you were telling me before sending this, and that
doesn't work.

There is a stack # in both the send and receive ... should they be the
same or different. If I change it to 1, I get a trigger exception error.

Here is the flow ... both run in activation group Qile

Call CSupdtxCL ... (1)

Load file ...
Call CSupdt ... (2) 
Trigger caused by an update ... (3)

I used 3 as my stack # when qmhsndpm was called in the trigger program
... should the recv stack # be the same or am I confusing that piece as
being something it is not?


<<snip>>

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.