MQ grouping records

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf MQ grouping records

  • Creator
    Topic
  • #54922
    Jason Laskowski
    Participant

      Has anyone used the MQGMO_ALL_MSGS_AVAILABLE and MQGMO_LOGICAL_ORDER settings to read in multiple MQ records of a unique group ID?

      I have seen examples in Java but how would we read in the group in Cloverleaf so that we can then do the xlate on the entire data in the group?

    Viewing 1 reply thread
    • Author
      Replies
      • #83466
        Jason Laskowski
        Participant

          When I try to read in a group that I created with a sample Java program, I get this error in Cloverleaf:

          QMGT(QMGT.WM01) MQGET MQCC_FAILED(2256:MQRC_WRONG_GMO_VERSION)

        • #83467
          Peter Heggie
          Participant

            The wrong GMO version number is referring to one of the fields in the header of the options block. It should be version 2 (of the MQ software). Not sure if this is a bug.

            You should be able to combine GMO_LOGICAL_ORDER and GMO_ALL_MSGS_AVAILABLE, at least you can in most implementations of WMQ.

            In languages like COBOL you must explicitly set the GMO_VERSION, but I don’t know if Cloverleaf does this for you or if you have to set this.

            Also you must set the group_id value – it does not automatically retain the value from the first Get and then use it for the next Get, you must set it before the Get. You could do the first Get without it set, save that value and then set the GROUP_ID to that value for all subsequent Gets.

            Having said all that, with all these options set, you would still get one Cloverleaf msg per MQ msg, so if you want all the data in the group (gathered from multiple messages), you still need to collate the data from multiple messages. Maybe you could write all these to an outbound thread that writes to a file with the append option.

            Peter Heggie

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.