A SOAP example

You can use a CICS® TS SOAP application to retrieve a UTF-8 or UTF-16 message from a socket or WebSphere® MQ message queue, put a message into a container in UTF-8 format, put EBCDIC data structures into other containers on the same channel, or make a distributed program link (DPL) call to a handler program on a back end AOR, passing the channel.

The back end handler program, also running on CICS TS, can use EXEC CICS GET CONTAINER commands to retrieve the EBCDIC data structures or the messages. It can get the messages in UTF-8 or UTF-16, or in its own or the region's EBCDIC code page. Similarly, it can use EXEC CICS PUT CONTAINER commands to place data into the containers, in UTF-8, UTF-16, or EBCDIC.

To retrieve one of the messages in the region's EBCDIC code page, the handler can issue the command:
EXEC CICS GET CONTAINER(
input_msg
) INTO(
msg
)
Because the INTOCCSID and INTOCODEPAGE options are not specified, the message data is automatically converted to the region's EBCDIC code page. (This assumes that the PUT CONTAINER command used to store the message data in the channel specified a DATATYPE of CHAR; if it specified a DATATYPE of BIT, the default, no conversion is possible.)
To return some output in the region's EBCDIC code page, the handler can issue the command:
EXEC CICS PUT CONTAINER(
output
) FROM(
output_msg
)
Because CHAR is not specified, no data conversion is permitted. Because the FROMCCSID and FROMCODEPAGE options are not specified, the message data is taken to be in the region's EBCDIC code page.
To retrieve one of the messages in UTF-8, the INTOCCSID or INTOCODEPAGE option must be specified to identify the code page and prevent automatic conversion of the data to the region's EBCDIC code page. The handler can issue the command:
EXEC CICS GET CONTAINER(
input_msg
) INTO(
msg
) INTOCCSID(utf8)
In this case, utf8 is a variable which is defined as a fullword, and is initialized to 1208, which is the Coded Character Set Identifier, or CCSID, for UTF-8. If you prefer to use an IANA charset name for the code page, you can use the INTOCODEPAGE option instead of the INTOCCSID option:
EXEC CICS GET CONTAINER(
input_msg
) INTO(
msg
) INTOCODEPAGE(utf8)
In this case, utf8 is a variable which is defined as a character string of length 56, and is initialized to 'utf-8'.
To return some output in UTF-8, the server program can issue the command:
EXEC CICS PUT CONTAINER(
output
) FROM(
output_msg
) FROMCCSID(utf8)
or alternatively:
EXEC CICS PUT CONTAINER(
output
) FROM(
output_msg
) FROMCODEPAGE(utf8)
where the variable utf8 is defined and initialized in the same ways as for INTOCCSID and INTOCODEPAGE. The FROMCCSID or FROMCODEPAGE option specifies that the message data is currently in UTF-8 format. Because FROMCCSID or FROMCODEPAGE is specified, a DATATYPE of CHAR is implied, so data conversion is permitted.


dfhp3_ch23.html | Timestamp icon Last updated: Monday, 5 June 2017