RECEIVE MAP vectors

 

A RECEIVE MAP request is a request for the client to provide a RECEIVE MAP on the next input message. Unlike a SEND MAP vector, an outbound RECEIVE MAP request vector never contains an ADS. It contains an ADSD or ADSDL that describes the ADS data that it requires in the next inbound RECEIVE MAP vector, provided that MQCADSD_RECV has been specified in MQCIH.ADSDescriptor. The RECEIVE MAP vector structure differs from that of the SEND MAP vector. The main difference is that there are no fields giving the offset and length of the ADS.

Do the following to interpret a RECEIVE MAP vector (assuming that the message contains an ADSD or ADSDL):

  1. Get the message containing the RECEIVE MAP request vector from the bridge reply queue into a message buffer.

  2. Locate the start of the outbound RECEIVE MAP vector in the message buffer. This is appended to the CIH and so is at an offset equal to the length of the CIH from the start of the message buffer. We can use this code fragment as a model.
    /* #includes                                                 */
    #include cmqc.h                 /* WebSphere MQ header       */
    #include dfhbrmqh.h             /* Vector structures         */
    ⋮
    /* #defines                                                  */
    ⋮
    MQCHAR * MsgBuffer ;            /* Message buffer pointer    */
    brmq_receive_map_request * pVector ;   /* Vector pointer     */
    ⋮
    /* Get message from reply queue                              */
    ⋮
    /* Set the vector pointer to the start of the vector         */
    pVector = MsgBuffer + ((MQCIH *) MsgBuffer)->StrucLength ; 
    ⋮

  3. Identify the starting address ADSD or ADSDL from the RECEIVE MAP vector.

    This following diagram shows the structure of an outbound RECEIVE MAP request vector (the diagram assumes that you have set a pointer called pVector to address the start of the brmq_receive_map_request vector, as in the code fragment above).

    |--------x'vvvvvvvv'-----------------→|
    
     sizeof(brmq_receive_map_request) 
    |------------------------→| 
                                                    
          1802 O           --→ x'wwwwwwww' ←--
     --------------  ...  ----------------
    |vvvv|FFFF|D444|     |wwww| ADSD or   |
    |vvvv|1802|6000|     |wwww| ADSDL     |
     --------------  ...  ----------------
    ↑                    ↑ 
    pVector              pVector->brmq_rmr_adsd_len 
    
    Values in the diagram shown like this:
    ABCD
    1234
    
    show hexadecimal values as you would see them in an ISPF editor with hex on. This is equivalent to the hexadecimal value X'A1B2C3D4'.

    Field pVector->brmq_rmr_adsd_len gives the length of the ADSD or ADSDL. No offset is given since the ADSDL is appended directly to the brmq_receive_map_request vector.

  4. Identify the fields in the ADSD or ADSDL. To do this, proceed in general as for the SEND MAP vector described in SEND MAP vectors. Use the following code fragment, however, to set pointers to the start of the ADSD or ADSDL.
    ⋮
    if (mqcih.ADSDescriptor && MQCADSD_MSGFORMAT)
    {
        pADSDL_D = pVector + sizeof(brmq_receive_map_request) ;
        ⋮
    }
    
    else                                  /* Short form          */
    {
        pADSD_D = pVector + sizeof(brmq_receive_map_request) ;
        ⋮
    }
    ⋮
    The ADSD or ADSDL has exactly the same structure in the RECEIVE MAP vector as in the SEND MAP vector, so once you have identified its start address we can proceed as described for the SEND MAP vector.

 

Parent topic:

Interpreting outbound SEND MAP and RECEIVE MAP vectors


fg15630_