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


  • Subject: Re: Display a Messsage
  • From: rob@xxxxxxxxx
  • Date: Thu, 19 Apr 2001 16:02:25 -0500


MsgKey is defined like MessageKey.  It is a return variable, not something
you send.  You can then use this key in other api's to get back the
response, (if any) that someone may send to this message.  The key could
also be used to remove the message from the stack after you sent it.
Check out:
http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/apis/QMHSNDPM.htm


Rob Berendt

==================
Remember the Cole!


                                                                                
                                       
                    tomh@simas.com                                              
                                       
                    Sent by:                 To:     RPG400-L@midrange.com      
                                       
                    owner-rpg400-l@mi        cc:                                
                                       
                    drange.com               Subject:     Re: Display a 
Messsage                                       
                                                                                
                                       
                                                                                
                                       
                    04/19/01 11:34 AM                                           
                                       
                    Please respond to                                           
                                       
                    RPG400-L                                                    
                                       
                                                                                
                                       
                                                                                
                                       





What is 'MsgKey'?  Where is it defined, and the value assigned to it?



                                                                            
                             rob@dekko.com                                  
                             Sent by:                         To:           
                             owner-rpg400-l@midran    RPG400-L@midrange.com 
                             ge.com                           cc:           
                                                              Subject:      
                             04/19/01 10:13 AM        Re: Display a         
                             Please respond to        Messsage              
                             RPG400-L                                       
                                                                            
                                                                            





Have you thought of using the message line?  Then you could use the
following:

...
* Send a program message.
D qmhsndpm        PR                  EXTPGM('QMHSNDPM')
D  MessageId                     7A   CONST
D  MessageFile                  20A   CONST
D  MsgDataOrText               300A   CONST OPTIONS(*VARSIZE)
D  MsgDataLen                   10I 0 CONST
D  MessageType                  10A   CONST
D  CallStackEnt                 30A   CONST OPTIONS(*VARSIZE)
D  CallStackCtr                 10I 0 CONST
D  MessageKey                    4A   CONST
D  qmhsndpmErr                        LIKE(ErrorCodeP)
...
D ErrorCode       DS
D  BytesProvided                10I 0
D  BytesAvail                   10I 0
D  ExceptionId                   7A
D  Reserved1                     1A
D  ExceptData                  256A
D ErrorCodeP      S                   LIKE(ErrorCode)
D                                     based(pErrorCode)
D pErrorCode      S               *   inz(%addr(ErrorCode))
...
 * IErrorCode is used internally.
D IErrorCode      DS
D  IBytesProvide                10I 0
D  IBytesAvail                  10I 0
D  IExceptionId                  7A
D  IReserved1                    1A
D  IExceptData                 256A
D IErrorCodeP     S                   LIKE(IErrorCode)
D                                     based(pIErrorCode)
D pIErrorCode     S               *   inz(%addr(IErrorCode))
...
C                   Eval      IExceptionId='CPF9898'
C                   Eval      IExceptData='Now processing record ' +
C                             %trim(%editc(x:'Z')) + ' of ' +
C                             %trim(%editc(y:'Z'))
...
C                   CallP     qmhsndpm(IExceptionId:
C                                      'QCPFMSG   *LIBL  ':
C                                      %trim(IExceptData):
C                                      %len(%trim(IExceptData)):
C                                      '*STATUS   ':
C                                      '*':
C                                      0:
C                                      MsgKey:
C                                      ErrorCodeP)
...
And the program is multimode.  Meaning this logic should work batch,
interactive, or whatever.  Granted the 'record x of y' example is a little
extreme, but you can tailor it to follow the logic of your own program.
And I would put all of the above lines except the C specs into a /COPY
member.  You'll find yourself using it a whole lot.


Rob Berendt

==================
Remember the Cole!



                    Amir Khan
                   <akhan@saudicemen        To:
"'RPG400-L@midrange.com'" <RPG400-L@midrange.com>
                   t.com.sa>                cc:
                   Sent by:                 Subject:     Display a Messsage
                   owner-rpg400-l@mi
                   drange.com


                    04/19/01 01:48 AM
                   Please respond to
                   RPG400-L






Hi,

I am trying to display a message through my interactive RPG program. My RPG
program takes input and starts continue executing when Enter key is pressed
by user. Since program is taking longer time to finish processing, I just
want to display a 'Please Wait?Processing' message on the screen without
erasing the input screen. I am not calling my RPG program from any CL
program since I am using SQL in it. If I define a second record format in
DDS with OVERLAY and use EXFMT then program displays the message but also
wait for Enter key press again, simply WRITE statement in RPG does not.

For any help many thanks in advance.

Amir
System Analyst, SCC,
K.S.A.
(00-966-03-8344500 X267)

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---





+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.