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



IRG,

Why don't you send the message to the calling interactive programs message
queue. Im sure I've done this before by using the calling programs name in
the message subfile, bit I thought you could use SNDPGMMSG to send a message
directly to the calling programs message queue, so the message should appear
in the message subfile.

Cheers
Colin.W 

-----Original Message-----
From: ile rpg [mailto:ile_rpg_guy@xxxxxxxxxxx] 
Sent: 17 February 2004 22:50
To: rpg400-l@xxxxxxxxxxxx
Subject: Sending messages to the previous (caller's) subfile message queue


   I use message subfiles for regular application error messages;
   everything's dandy.  Now, I'd like to send a message from a called
program
   back to the calling interactive program.  I'm returning the error message
   ID, so the caller knows there's been a problem, but I don't want to add
   the logic to post the error message to the caller's error message
   subfile.  I want the called program to do all the work so I don't have
   to. 

   When I jockey @clstkcounter, the error messages show up in the job log.
I
   can send the message to *EXT but that's gross and will make users panic. 
   I don't need an escape message.  If all else fails, I'll pop up a little
   window with the message in it, but I'm sure done this before and have
   brain-faded. 

   This is my so-called proof-of-concept code:

   D @msgid          s              7    inz('CPF9801')              
   D @msgfile        s             20    inz('QCPFMSG   *LIBL     ')
   D @msgdata        s             10                                
   D @msgdatalen     s             10i 0                            
   D @msgtype        s             10    inz('*DIAG')                
   D @clstkentry     s             10    inz('*')                    
   D @clstkcounter   s             10i 0 inz(1)                      
   D @msgkey         s              4                                
   D @apierr         s            256                                
                                                                     
   C                   call      'QMHSNDPM'                          
   C                   parm                    @msgid                
   C                   parm                    @msgfile              
   C                   parm                    @msgdata              
   C                   parm                    @msgdatalen          
   C                   parm                    @msgtype              
   C                   parm                    @clstkentry          
   C                   parm                    @clstkcounter        
   C                   parm                    @msgkey              
   C                   parm                    @apierr              

   I'm sure it's the right combination of @clstkentry and @clstkcounter
   values.  I'd appreciate any suggestions!

   Thanks,
   IRG                                                                  

    

     ----------------------------------------------------------------------

   Say *good-bye* to spam, viruses and pop-ups with MSN Premium -- free
trial
   offer!
_______________________________________________
This is the RPG programming on the AS400 / 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.

This e-mail has been sent by a company of Bertram Group Ltd, whose registered 
office is The Nest, Rosary Road Norwich NR1 1TF. 
This message, and any attachments, are intended solely for the addressee and 
may contain privileged or confidential information.  If you are not the 
intended recipient, any disclosure, copying, distribution or any action taken 
or omitted to be taken in reliance on it, is prohibited and may be unlawful.  
If you believe that you have received this email in error, please contact the 
sender immediately. Opinions, conclusions and statements of intent in this 
e-mail are those of the sender and will not bind a Bertram Group Ltd company 
unless confirmed in writing by a director independently of this message. 
Although we have taken steps to ensure that this email and any attachments are 
free from any virus, we advise that in keeping with good computing practice the 
recipient should ensure they are actually virus free.


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.