Display files

When a display file object is created, it is tagged with the coded character set identifier (CCSID) of the source file.

At compile time:

  • All character data is read from the primary source file without any character conversion being performed.
  • User message text (identified by the MSGCON keyword in DDS) remains the same because it is assumed to be in the same CCSID as the primary source file.

At run time, the constant data is converted based on the CHRID parameter value used to create the display file object. This conversion is optional and can occur only when the CHRID is set to *JOBCCSID or indirectly with CHRIDCTL. This conversion is from the display file CCSID to the character identifier (CHRID) of the device. The field-level keyword NOCCSID (no coded character set identifier) allows the user to specify fields within the DDS that are never to be converted.

Note: To use data management support of CCSIDs, you must change source physical files tagged with CCSID 65535 to a CCSID value that is associated with the data.

CHRID parameter on the Create Display File command

The CHRID parameter on the Create Display File (CRTDSPF) command affects the conversion that occurs for the display file.

If the *JOBCCSID value is specified on the CHRID parameter of the CRTDSPF command:

  • Input characters are converted from the device character identifier (CHRID) to the job CCSID.
  • Character data is sent to output-capable fields and converted from the job CCSID to the device CHRID.
  • Constant text from the display file is converted from the CCSID of the display file to the CHRID of the device.
  • All message files are tagged with a CCSID. Message text is converted from the CCSID of the message file to the CHRID of the device. When message files are tagged with a CCSID of 65535 (the system default), it is assumed that the contents of the message files are already in the CHRID of the device. To ensure that appropriate conversions occur, you can enable CCSID support for messages.
  • Message replacement data is converted from the CCSID of the job, or from the CCSID of the display file, to the CHRID of the device.
  • All status messages that are tagged with a CCSID other than 65535 are converted to the CHRID of the device.
  • Message text for messages on a message line or in a message subfile (identified by the ERRMSG, ERRMSGID, SFLMSG, and SFLMSGID keywords in DDS) is converted from the message file CCSID to the device CHRID.

If a specific value is specified for the CHRID parameter on the CRTDSPF command, conversion is done between the CHRID specified on the CRTDSPF command and the CHRID of the device. This conversion affects only fields defined with the CHRID DDS keyword.

If the *DEVD value is specified on the CHRID parameter of the CRTDSPF command, no conversion is performed. This is the default setting.

Migration of display files with CCSID 65535

All source files in Version 3 of the IBM® i licensed program have an implicit CCSID value of 65535. To have appropriate CCSID support, display files must be recompiled with a source file that has a CCSID value other than 65535 if either of the following conditions are true:

  • The display file was originally compiled from a source file with a CCSID value of 65535.
  • The display file was originally compiled before Version 2 Release 3 Modification 0 of the OS/400® licensed program.

By recompiling, the display file object is tagged and all necessary conversions take place when needed.

No conversions take place if the source files are explicitly tagged CCSID 65535.