INBUF parameter, OUTLEN parameter, OUTBUF parameter" /> Parameters

 

Parameters

The MQCONVX call has the following parameters.

 

MQDXP (MQDXP) - input/output

Data-conversion exit parameter block.

This structure contains information relating to the invocation of the exit. The exit sets information in this structure to indicate the outcome of the conversion. See MQDXP - Data-conversion exit parameter for details of the fields in this structure.

 

MQMD (MQMD) - input/output

Message descriptor.

On input to the exit, this is the message descriptor that would be returned to the application if no conversion were performed. It therefore contains the MDFMT, MDENC, and MDCSI of the unconverted message contained in INBUF.

Note:
The MQMD parameter passed to the exit is always the most recent version of MQMD supported by the queue manager which invokes the exit. If the exit is intended to be portable between different environments, the exit should check the MDVER field in MQMD to verify that the fields that the exit needs to access are present in the structure.

On i5/OS, the exit is passed a version-2 MQMD.

On output, the exit should change the MDENC and MDCSI fields to the values requested by the application, if conversion was successful; these changes will be reflected back to the application. Any other changes that the exit makes to the structure are ignored; they are not reflected back to the application.

If the exit returns XROK in the DXRES field of the MQDXP structure, but does not change the MDENC or MDCSI fields in the message descriptor, the queue manager returns for those fields the values that the corresponding fields in the MQDXP structure had on input to the exit.

 

INLEN (10-digit signed integer) - input

Length in bytes of INBUF.

This is the length of the input buffer INBUF, and specifies the number of bytes to be processed by the exit. INLEN is the lesser of the length of the message data prior to conversion, and the length of the buffer provided by the application on the MQGET call.

The value is always greater than zero.

 

INBUF (1-byte bit string×INLEN) - input

Buffer containing the unconverted message.

This contains the message data prior to conversion. If the exit is unable to convert the data, the queue manager returns the contents of this buffer to the application after the exit has completed.

Note:
The exit should not alter INBUF; if this parameter is altered, the results are undefined.

 

OUTLEN (10-digit signed integer) - input

Length in bytes of OUTBUF.

This is the length of the output buffer OUTBUF, and is the same as the length of the buffer provided by the application on the MQGET call.

The value is always greater than zero.

 

OUTBUF (1-byte bit string×OUTLEN) - output

Buffer containing the converted message.

On output from the exit, if the conversion was successful (as indicated by the value XROK in the DXRES field of the MQDXP parameter), OUTBUF contains the message data to be delivered to the application, in the requested representation. If the conversion was unsuccessful, any changes that the exit has made to this buffer are ignored.