Data conversion for the CICS-WebSphere MQ bridge in the distributed environment
CICS® DPL programs and 3270 transactions can be driven through the CICS-WebSphere MQ bridge when the client application resides on a workstation. The main consideration when programming for the distributed environment is data conversion between the different encoding schemes and CCSID values of the workstation and z/OS®.
Conversion is carried out by two different routines, one for the MQCIH structure and another for the data or vectors supplied in the message. If you have an MQCIH in the message then you must specify MQFMT_CICS in the format field of the header immediately before the MQCIH. If there are no headers before the MQCIH then you must specify MQFMT_CICS in the MQMD.Format field. Data and vector conversion requires a little more consideration.
If you are driving a DPL program that does not receive or return COMMAREA or container data, or if the COMMAREA or container data is purely character data, you can achieve data conversion by specifying MQFMT_STRING as the format value. If the COMMAREA or container data is purely binary, data conversion is unnecessary, so you then specify MQFMT_NONE as the format value. If your COMMAREA or container data is a mix of character and binary data, you must write your own conversion routine and specify an appropriate format value. See IBM MQ product documentation for information about writing conversion routines.
If the message includes an MQCIH, specify the format value in MQCIH.Format. If the message does not include an MQCIH but does include other headers, then specify the format value in the last header. If the message does not include any headers then specify the format value in the MQMD.
If you are driving a DPL program that generates response data in the COMMAREA and you provided a reply-to queue, then you must specify the format value for this response data in your request message in MQCIH.ReplyToFormat. If you are driving a DPL program that generates response data in a container then you do not need to specify MQCIH.ReplyToFormat because the container identifies itself as character or binary data.
- Make sure that you assemble your maps by specifying DSECT=ADSDL in your DFHMSD macro. If you do not have the original mapset definition, re-create the map using the CICS DFHBMSUP utility.
- Specify a value of MQCADSD_SEND+MQCADSD_MSGFORMAT in field MQCIH.ADSDescriptor. If you are using an ADSD or ADSDL to build your RECEIVE MAP ADS, add in the value MQCADSD_RECV for this field.
- Specify a value of DFHMQDCI or CSCQBDCI in field MQCIH.Format on every inbound message. If the input format is CSQCBDCI the output format is CSQCBDCO. If the input format is DFHMQDCI the output format is DFHMQCDO.
- Ensure that CONVERT=YES is specified on the channel between z/OS and the workstation, and that the data conversion program DFHMQDCI is installed in the channel initiator.
When reply messages from 3270 transactions are sent to a non-z/OS system, the sender channel must specify the CONVERT(YES) option.