Interpreting RECEIVE MAP vectors for the CICS-WebSphere MQ bridge
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, if 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 no fields give the offset and length of the ADS.
To interpret a RECEIVE MAP vector (assuming that the message contains an ADSD or ADSDL):
- Get the message containing the RECEIVE MAP request vector from the bridge reply queue into a message buffer.
- Locate the start of the outbound RECEIVE MAP vector in the message
buffer. This vector is appended to the MQCIH and so is at an offset
equal to the length of the CIH from the start of the message buffer.
You 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 ; ⋮ - 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 previous code fragment.
Values in the diagram shown like this:|--------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
show hexadecimal values as you see them in an ISPF editor with hex on . This value is equivalent to the hexadecimal value X'A1B2C3D4'.ABCD 1234Field pVector->brmq_rmr_adsd_len gives the length of the ADSD or ADSDL. No offset is given because the ADSDL is appended directly to the brmq_receive_map_request vector.
- Identify the fields in the ADSD or ADSDL.
To do so, proceed in general as for the SEND MAP vector described in Interpreting SEND MAP vectors for the CICS-WebSphere MQ bridge . Use the following code fragment, however, to set pointers to the start of the ADSD or ADSDL.
The ADSD or ADSDL has exactly the same structure in the RECEIVE MAP vector as in the SEND MAP vector; so, after you have identified its start address, you can proceed as described for the SEND MAP vector.⋮ if (mqcih.ADSDescriptor && MQCADSD_MSGFORMAT) { pADSDL_D = pVector + sizeof(brmq_receive_map_request) ; ⋮ } else /* Short form */ { pADSD_D = pVector + sizeof(brmq_receive_map_request) ; ⋮ } ⋮