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

I am trying to display the contents of a Data Queue and I am having problems
using API QMHRDQM displaying the actual text from the Data Queue.

I am trying to add offset1 to the address of QDQM_RtnData get the Offset
Entry (QDQE_Entry).  I can see a valid value in QDQE_Offset2 but
QDQE_MsgText just contains garbage.

Any help would be very much appreciated.

regards,
Terry

      * ----------------------------------------
      * Data Queue Messages Variable definitions
      * Used for RcvDtaQMsg API
      * ----------------------------------------
     D DM_RcvVar       S          32766A
     D DM_LengthRcv    S             10I 0 inz(200)
     D DM_FormatName   S              8A   inz('RDQM0100')
     D DM_MsgSltLeng   S             10I 0 inz(8)
     D DM_MsgSltFmtNa  S              8A   inz('RDQS0100')
     D DM_Error        S          32766A

     D DM_MSI          DS
     D  MSI_Type               1      1    INZ('A')
Select All Msgs
     D  MSI_Resrv              2      4
     D  MSI_NumMsgs            5      8B 0

     D QDQM_RtnData    DS          9999
     D  QDQM_BytRtn                  10I 0
     D  QDQM_BytAvl                  10I 0
     D  QDQM_MsgsRtn                 10I 0
     D  QDQM_MsgsAvl                 10I 0
     D  QDQM_KeyLRtn                 10I 0
     D  QDQM_KeyLAvl                 10I 0
     D  QDQM_TxtLRtn                 10I 0
     D  QDQM_TxtLAvl                 10I 0
     D  QDQM_EntLRtn                 10I 0
     D  QDQM_EntLAvl                 10I 0
     D  QDQM_Offset1                 10I 0
     D  QDQM_LibName                 10A
     D  QDQM_Reserved                 1A

     D QDQE_Entry      DS          9999    BASED(PtrDqEnt)
     D  QDQE_Offset2                 10I 0
     D  QDQE_EnqDtTm                  8A
     D  QDQE_Key1                     1A
     D  QDQE_MsgText               9986A
      *
     D PtrRtnDQM       S               *
     D PtrDqEnt        S               *


     D  MsgText        S             52A
      *
      *
      * ----------------------------------------
      * Data Queue Description Variable definitions
      * Used for RcvDtaQDesc API
      * ----------------------------------------
     D DD_FormatName   S              8A   inz('RDQD0100')
     D  DtaQueName     S             20A
      *
     Dds_RDQD0100      DS            80
     D QD_MsgLen               9     12I 0
     D QD_NumEntries          73     76I 0
     D QD_MaxMsgs             77     80I 0
      *
      *---------------------------------------------------------------------
      *
      *
      *--  Retrieve Data Queue info
     C                   EXSR      RtvDtaQMsgs
      *
     C                   MOVE      *ON           *INLR
      *
     C*****************************************************************
      *
     C     RtvDtaQMsgs   BEGSR
      *
      *  Retrieve Data Queue Attributes
     C                   EXSR      RtvDtaQDesc
      *
     C                   Eval      MSI_NumMsgs = QD_NumEntries
      *
      *  Retrieve contents of Data Queue
     C                   CallP     RcvDtaQMsg (QDQM_RtnData
     C                                     : %Size(QDQM_RtnData)
     C                                     : DM_FormatName : DtaQueName
     C                                     : DM_MSI : %Size(DM_MSI)
     C                                     : DM_MsgSltFmtNa : DM_Error)
      *
     C                   Eval      PtrDqEnt  = %ADDR(QDQM_RtnData) +
     C                                         QDQM_Offset1
     C                   Eval      Msgtext  = %subst(QDQE_MsgText
     C                                     : 1  : 5)
     C
     C     Msgtext       DSPLY
      *
      *
     C                   ENDSR
     C*****************************************************************
      *
     C     RtvDtaQDesc   BEGSR
      *
     C                   Eval      DtaQueName = "ADTAQ     QGPL"

      * Retrieves information about the Data Queue
     C                   CallP     RcvDtaQDesc(DD_DtaQDesc :
%size(DD_DtaQDesc)
     C                                     : DD_FormatName : DtaQueName)
      *
      * Move API Data in Data Structure
     C                   Eval      ds_RDQD0100 = DD_DtaQDesc
      *
     C                   ENDSR
      *

Terry Beeson
Developer - Project Bridge
01622 656-260


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.