CCSID of the text returned (TXTCCSID) return field

TXTCCSID is the CCSID of the text returned.

If a conversion occurs and is successful, this value is always equal to the CCSID-to-convert-to value. If a conversion occurs and is not successful, this is the CCSID of the message file unless the CCSID of the message file is 65534. If the CCSID of the message file is 65534, the CCSID of the message description is returned.

For example, message file MYMSGF has a CCSID of 65534. Your program needs to know the CCSID of message description TST0004. Specify the RTVMSG command as follows:

RTVMSG MSGF(MYMSGF) MSGID(TST0004) CCSID(*HEX)
TXTCCSID(&TXTCCSID);

The CCSID of the message description is returned in the variable &TXTCCSID because you specified *HEX for the CCSID-to-convert-to parameter. *HEX means no conversion is to occur. If no conversion occurs and the message file CCSID is 65534, the message description CCSID is returned.

You can also obtain the message description CCSID from the Work with Message Descriptions (WRKMSGD) display.

  1. On the WRKMSGD display, select option 5 to display details.
  2. From the Select Message Details to Display menu, select option 5 to display message attributes.
  3. Page forward to the CCSID value.

    The message description CCSID is shown if the CCSID of the message file is 65534. If the CCSID of the message file is not 65534, the CCSID of the message file is shown.

Related reference
Work with Message Descriptions (WRKMSGD) command