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



Just use:
C                   MOVEL(P)  '*INFO  '     QMHTYP  
C                   MOVEL(P)  '*   '        QMHPGQ  
C                   Z-ADD     2             QMHSTK 
To get the message in the msgq of the calling program.

Regards,
Eduard Sluis.

> 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                                                               


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.