× 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: Help using the Retrieve Data Queue Message (QMHRDQM) API
  • From: "Westdorp, Tom" <tom.westdorp@xxxxxxxxxxxxxxxxxx>
  • Date: Tue, 30 May 2000 10:35:47 -0700

Hi,

I hope someone on the list can help me with the Retrieve Data Queue Message
(QMHRDQM) API.

I make a prototyped call to the Retrieve Data Queue Description (QMHQRDQD)
and get the necessary header information, then make a prototyped call to
QMHRDQM for the non destructive read of the contents.  I'm starting with a
non-keyed data queue.

The format I'm using for RDQM0100 is:
D RDQM0100        DS                                   
D  BytesRtn                     10i 0 Inz(0)           
D  BytesAvl                     10i 0 Inz(0)           
D  #returned                    10i 0 Inz(0)           
D  #available                   10i 0 Inz(0)           
D  KeyLngthRtn                  10i 0 Inz(0)           
D  KeyLngthAvl                  10i 0 Inz(0)           
D  TxtLngthRtn                  10i 0 Inz(0)           
D  TxtLngthAvl                  10i 0 Inz(0)           
D  EntLngthRtn                  10i 0 Inz(0)           
D  EntLngthAvl                  10i 0 Inz(0)           
D  OffsetFirst                  10i 0 Inz(0)           
D  Qlibrary                     10    Inz('          ')
D  Rsvd1                         1    Varying          
D  OffsetNext                   10i 0 Inz(0)           
D  EnqDatTim                     8                     
D  MsgKey                        1    Varying          
D  MsgText                   32689    Varying
D  Rsvd2                         1    Varying 

The info I get back is fine throught the Qlibrary field, the OffsetNext
always comes out to 128, the EnqDatTim decodes (via a prototyped call to
QWCCVTDT) to 20330131002706259, and the first six bytes of the data queue
entry are 'missing'.
Here's the contents of the return structure:
BYTESRTN OF RDQM0100 = 832         
BYTESAVL OF RDQM0100 = 832         
#RETURNED OF RDQM0100 = 1          
#AVAILABLE OF RDQM0100 = 1         
KEYLNGTHRTN OF RDQM0100 = 0        
KEYLNGTHAVL OF RDQM0100 = 0        
TXTLNGTHRTN OF RDQM0100 = 764      
TXTLNGTHAVL OF RDQM0100 = 764      
ENTLNGTHRTN OF RDQM0100 = 776      
ENTLNGTHAVL OF RDQM0100 = 776      
OFFSETFIRST OF RDQM0100 = 56       
QLIBRARY OF RDQM0100 = 'CMSDTABS  '
RSVD1 OF RDQM0100 = ' '            
OFFSETNEXT OF RDQM0100 = 128                                            
ENQDATTIM OF RDQM0100 = ']ß ©U  0'                                      
MSGKEY OF RDQM0100 = '0'                                                
MSGTEXT OF RDQM0100 =                                                   
          ....5...10...15...20...25...30...35...40...45...50...55...60  
     1   '21403000790|MPPTH     CMSDTAMP  MPPTH     320      èJ    ' 
    61   '   -    '     ]    Q                   MPä¤ä¤3r' 
   121   'r°   MPGMPPTH  rr¤                              b         ' 
   181   '     j&   ¬     j¤    j&       Ë&    ¤   - " ' 
   241   '    ¤     â⬠  îb¬              r   /          â ' 
   301   '                                                          ±' 
   361   '              Í                000000000000000000000000000' 
   421   '00000000000000000000000000000000000MPä¤ä¤3rr°   CITRPG  ' 
   481   '  rr¤                              b              j&   ' 
                                                                     More
A dump of the dtaq object returns:
*00000021403000790|MPPTH     CMSD* 
*TAMP  MPPTH     320         èJ  * 
*     -       '       ]       Q  * 
*                  MPä  ¤ä  ¤3rr°* 
*   MPGMPPTH  rr¤                * 
etc.

So the first 6 )'s are missing and the pipe character marking the beginning
of the data is is pos 12, not pos 18.

I seem to be screwing up in the enqueue date and time, which the API doc on
the InfoCenter desribes as 8 character.  I've walked it in to 1 character
and come close to the right offset for the pipe but still not gotten right.

I'd sure appreciate any help the list can offer.

Thanks!

Tom Westdorp
AS/400 Senior Programmer/Analyst
Voice: (702) 221-6859
Fax:    (702) 221-6881
tom.westdorp@stationcasinos.com <mailto:tom.westdorp@stationcasinos.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 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.