You can use the DATATYPE(DFHVALUE(CHAR)) option
of the PUT CONTAINER or PUT64 CONTAINER command to specify that a
container holds character data eligible for conversion. If the client
and server platforms are different, the GET CONTAINER or GET64
CONTAINER
command converts the data automatically.
About this task
The following procedure demonstrates how to convert character
data automatically by using PUT CONTAINER and GET CONTAINER commands.
For AMODE(64) programs, you can convert character data that
is in 64-bit storage in the same way by using PUT64 CONTAINER and
GET64 CONTAINER commands. These commands are for use only in
non-Language
Environment (LE) AMODE(64) assembler language application programs,
and
CICS®
business transaction
services (BTS) containers are not supported.
Procedure
-
In the
client program
, use the DATATYPE(DFHVALUE(CHAR))
option of the PUT CONTAINER command to specify that a container holds
character data and that the data is eligible for conversion.
For example:
EXEC CICS PUT CONTAINER(
cont_name
) CHANNEL('payroll')
FROM(
data1
) DATATYPE(DFHVALUE(CHAR))
There is no need to specify the FROMCCSID
or FROMCODEPAGE
option
unless the data is not in the default CCSID of the client platform.
(For CICS TS regions, the default CCSID is specified on the LOCALCCSID
system initialization parameter.) The default CCSID is implied.
-
In the
server program
, issue a GET CONTAINER command
to retrieve the data from the program's current channel:
EXEC CICS GET CONTAINER(
cont_name
) INTO(
data_area1
)
The data is returned in the default CCSID of the server platform.
There is no need to specify the INTOCCSID
or INTOCODEPAGE
option
unless you want the data to be converted to a CCSID other than the
default. If the client and server platforms are different, data
conversion
takes place automatically.
-
In the
server program
, issue a PUT CONTAINER command
to return a value to the client:
EXEC CICS PUT CONTAINER(
status
) FROM(
data_area2
)
DATATYPE(DFHVALUE(CHAR))
The
DATATYPE(DFHVALUE(CHAR)) option specifies that the container holds
character data and that the data is eligible for conversion. There
is no need to specify the FROMCCSID
or FROMCODEPAGE
option
unless the data is not in the default CCSID of the server platform.
-
In the
client program
, issue a GET CONTAINER command
to retrieve the status returned by the server program:
EXEC CICS GET CONTAINER(
status
) CHANNEL('payroll')
INTO(
status_area
)
The status is returned in the default CCSID of the client platform.
There is no need to specify the INTOCCSID
or INTOCODEPAGE
option
unless you want the data to be converted to a CCSID other than the
default. If the client and server platforms are different, data
conversion
takes place automatically.