Legacy platform

Testing client connectivity

This topic explains how to test the client connectivity using MQ client for MQ-based integration between Sterling™ Order Management System and an external system.

  1. Create an Sterling Order Management System MQ queue. For example, TESTQUEUE. For more information, see Adding queues.
  2. Use test messages.
    1. Using the MQ client, PUT a message to TESTQUEUE.
      On Linux or Unix:
      
      cd <MQ_Client_Installation_Path>/bin
      ./amqsputc TESTQUEUE OM_QMGR
      
      Sample AMQSPUT0 start
      Target queue is TESTQUEUE
      <type your message here>
      <enter>
      <enter>
      Sample AMQSPUT0 end
      
      On Windows:
      
      cd <MQ_Client_Installation_Path>\bin
      amqsputc TESTQUEUE OM_QMGR
      
      Sample AMQSPUT0 start
      Target queue is TESTQUEUE
      <type your message here>
      <enter>
      <enter>
      Sample AMQSPUT0 end
      

      Here, TESTQUEUE is the target queue and OM_QMGR is the Queue Manager to which the client connects.

    2. View the queue depth, you will see that the queue depth increments with each PUT message. To view the queue depth, run the Manage Queue - displayQueue.
    3. Using the MQ client, GET the message from TESTQUEUE.
      On Linux or Unix:
      
      cd <MQ_Client_Installation_Path>/bin
      ./amqsgetc TESTQUEUE OM_QMGR
      
      Sample AMQSGET0 start
      <the messages will be displayed here, one by one>
      <enter>
      <enter>
      Sample AMQSGET0 end
      
      On Windows:
      
      cd <MQ_Client_Installation_Path>\bin
      amqsgetc TESTQUEUE OM_QMGR
      
      Sample AMQSGET0 start
      <the messages will be displayed here, one by one>
      <enter>
      <enter>
      Sample AMQSGET0 end
      
    4. View the queue depth, you will see that the queue depth decreases with each GET message. To view the queue depth, run the Manage Queue - displayQueue self-serve process.
    5. Using the MQ client, BROWSE the messages in TESTQUEUE.
      On Linux or Unix:
      
      cd <MQ_Client_Installation_Path>/bin
      ./amqsbcgc TESTQUEUE OM_QMGR
      
      AMQSBCG0 - starts here
      *************
      MQOPEN - 'TESTQUEUE'
      
      MQGET of message number 1, CompCode:0 Reason:0
      ***Message descriptor****
      
       StrucId  : 'MD  '  Version : 2
       Report   : 0  MsgType : 8
       Expiry   : -1  Feedback : 0
       Encoding : 546  CodedCharSetId : 437
       Format : 'MQSTR   '
       Priority : 0  Persistence : 0
       MsgId : X'414D51204F4D5F514D4752202020202005638A5C0380C821'
       CorrelId : X'000000000000000000000000000000000000000000000000'
       BackoutCount : 0
       ReplyToQ       : '                                                '
       ReplyToQMgr    : 'OM_QMGR                                         '
       ** Identity Context
       UserIdentifier : 'mqm         '
       AccountingToken :
        X'16010515000000D47E07095A7512291E76A0AD1A04000000000000000000000B'
       ApplIdentityData : '                                '
       ** Origin Context
       PutApplType    : '11'
       PutApplName    : '<Installation_PATH>/bin/amqsbcgc.sh'
       PutDate  : '20190319'    PutTime  : '14123179'
       ApplOriginData : '    '
      
       GroupId : X'000000000000000000000000000000000000000000000000'
       MsgSeqNumber   : '1'
       Offset         : '0'
       MsgFlags       : '0'
       OriginalLength : '-1'
      
      ***   Message      ****
      
      length - 17 of 17 bytes
      
      0000000:  5465 7374 696E 6720 4D65 7373 6167 6520 'Testing Message '
      0000010:  32                                      '2               '
      
      No more messages
      MQCLOSE
      MQDISC
      On Windows:
      
      cd <MQ_Client_Installation_Path>\bin
      amqsbcgc TESTQUEUE OM_QMGR
      
      AMQSBCG0 - starts here
      *************
      MQOPEN - 'TESTQUEUE'
      
      MQGET of message number 1, CompCode:0 Reason:0
      ***Message descriptor****
      
       StrucId  : 'MD  '  Version : 2
       Report   : 0  MsgType : 8
       Expiry   : -1  Feedback : 0
       Encoding : 546  CodedCharSetId : 437
       Format : 'MQSTR   '
       Priority : 0  Persistence : 0
       MsgId : X'414D51204F4D5F514D4752202020202005638A5C0380C821'
       CorrelId : X'000000000000000000000000000000000000000000000000'
       BackoutCount : 0
       ReplyToQ       : '                                                '
       ReplyToQMgr    : 'OM_QMGR                                         '
       ** Identity Context
       UserIdentifier : 'mqm         '
       AccountingToken :
        X'16010515000000D47E07095A7512291E76A0AD1A04000000000000000000000B'
       ApplIdentityData : '                                '
       ** Origin Context
       PutApplType    : '11'
       PutApplName    : 'IST-WIN64\bin64\amqsputc.exe'
       PutDate  : '20190319'    PutTime  : '14123179'
       ApplOriginData : '    '
      
       GroupId : X'000000000000000000000000000000000000000000000000'
       MsgSeqNumber   : '1'
       Offset         : '0'
       MsgFlags       : '0'
       OriginalLength : '-1'
      
      ***   Message      ****
      
      length - 17 of 17 bytes
      
      0000000:  5465 7374 696E 6720 4D65 7373 6167 6520 'Testing Message '
      0000010:  32                                      '2               '
      
      No more messages
      MQCLOSE
      MQDISC
    Similarly, you can also browse the messages in the queue by using the Manage Queue - browseQueue self-serve process as well.
    If you are able to add, retrieve and browse the messages in the IBM Sterling® Order Management System queue, then the inbound flow is set up successfully.
    Note: This procedure is meant to test the inbound connection and not to consume the messages. If messages are consumed, then browsing the message does not show any result.