How to cause CICS to convert character data automatically

  1. 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 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.
  2. 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 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.
  3. 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 option unless the data is not in the default CCSID of the server platform.
  4. 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 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.