How to indicate a DBCS file
You must indicate that a device file is a DBCS file in order for the system to process double-byte data properly. You can indicate a DBCS file in the ways described in this topic.
- Through DDS:
- DDS provides fields of the following data types.
- DBCS-only fields: display and accept only double-byte characters. Double-byte characters in a DBCS-only field are enclosed in shift-out and shift-in characters that must be paired.
- DBCS-open fields: display and accept both single-byte and double-byte characters. Double-byte characters are enclosed in shift-out and shift-in characters that must be paired.
- DBCS-either fields: display and accept either single-byte or double-byte characters, but not both. Double-byte characters are enclosed in shift-out and shift-in character pairs.
- DBCS-graphic fields: display and accept only double-byte characters. Characters in a DBCS-graphic field do not have shift-out and shift-in characters. The i5/OS® DBCS-graphic field is equivalent to a System/370™ DBCS field.
- In ICF files, by defining fields with DBCS-open data type (type O).
- In printer files, by defining fields with DBCS-open data type (type O) and DBCS-graphic data type (type G).
- In display files, by defining fields with DBCS-only data type (type J), DBCS-either data type (type E), DBCS-open data type (type O), or DBCS-graphic data type (type G).
- By using a double-byte literal that is used with the file at processing time, such as literals specified with the Default (DFT) and Error Message (ERRMSG) DDS keywords.
You can also use double-byte literals as text and comments in a file, such as with the DDS keyword TEXT. However, the system does not consider a file, whose only DBCS usage is that it has double-byte comments, to be a DBCS file.
- By specifying the Alternative Data Type (IGCALTTYP) DDS keyword in display and printer files. This keyword lets you use display and printer files with both alphanumeric and double-byte applications. When you put the IGCALTTYP keyword into effect, you can use double-byte data with the file. Put the IGCALTTYP keyword into effect by creating, changing, or overriding display and printer files with the IGCDTA(*YES) value. You can put the IGCALTTYP keyword into effect for display and printer files by specifying IGCDTA(*YES) on the following device file commands:
When you specify IGCDTA(*NO), the IGCALTTYP keyword is not in effect and you can use only alphanumeric data with the file. Changing or overriding the file to put the IGCALTTYP keyword into effect does not change the DDS of the file.
- Create Display File (CRTDSPF)
- Create Printer File (CRTPRTF)
- Change Display File (CHGDSPF)
- Change Printer File (CHGPRTF)
- Override with Display File (OVRDSPF)
- Override with Printer File (OVRPRTF)
Except when using the IGCALTTYP function, you do not need to specify IGCDTA(*YES) on the file creation command if you have already specified DBCS functions in the DDS. Instead, specify IGCDTA(*YES) when the file has DBCS functions that are not indicated in the DDS. For example, specify IGCDTA(*YES) on the file creation command if the file is intended to contain double-byte data.
- By specifying IGCDTA(*YES) on the following device file creation commands:
- By specifying IGCDTA(*YES) on the following database file creation commands:
Parent topic:
DBCS device file support