File Management - IBM

File Management - IBM File Management - IBM

as400bks.rochester.ibm.com
from as400bks.rochester.ibm.com More from this publisher
30.06.2013 Views

DBCS device file support 204 File Management V4R5 v On displays, the system displays the undefined character where it would otherwise display extended characters. v On printed output, the system prints the undefined character where it would otherwise print extended characters. v The extended characters, though not displayed or printed, are stored correctly in the system. The following sections describe DBCS-capable device files and special considerations for working with DBCS-capable device files. Data description specifications (DDS), a language used to describe files, can be used with DBCS-capable device files. For information about using DDS, refer to the DDS Reference. What a DBCS file is A DBCS file is a file that contains double-byte data or is used to process double-byte data. Other files are called alphanumeric files. The following types of device files can be DBCS files: v Display v Printer v Tape v Diskette v ICF When to indicate a DBCS file You should indicate that a file is DBCS in one or more of the following situations: v The file receives input, or displays or prints output, which has double-byte characters. v The file contains double-byte literals. v The file has double-byte literals in the DDS that are used in the file at processing time (such as constant fields and error messages). v The DDS of the file includes DBCS keywords. See the DDS Reference for information on these keywords. v The file stores double-byte data (database files). 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 do this in one of the following ways: v 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 have to 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 have to 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 AS/400 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. Note: You may 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: - 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) 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. 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. v By specifying IGCDTA(*YES) on the following device file creation commands: – Create Diskette File (CRTDKTF) Appendix B. Double-byte character set support 205

DBCS device file support<br />

204 <strong>File</strong> <strong>Management</strong> V4R5<br />

v On displays, the system displays the undefined character where it would<br />

otherwise display extended characters.<br />

v On printed output, the system prints the undefined character where it would<br />

otherwise print extended characters.<br />

v The extended characters, though not displayed or printed, are stored correctly in<br />

the system.<br />

The following sections describe DBCS-capable device files and special<br />

considerations for working with DBCS-capable device files. Data description<br />

specifications (DDS), a language used to describe files, can be used with<br />

DBCS-capable device files. For information about using DDS, refer to the DDS<br />

Reference.<br />

What a DBCS file is<br />

A DBCS file is a file that contains double-byte data or is used to process<br />

double-byte data. Other files are called alphanumeric files.<br />

The following types of device files can be DBCS files:<br />

v Display<br />

v Printer<br />

v Tape<br />

v Diskette<br />

v ICF<br />

When to indicate a DBCS file<br />

You should indicate that a file is DBCS in one or more of the following situations:<br />

v The file receives input, or displays or prints output, which has double-byte<br />

characters.<br />

v The file contains double-byte literals.<br />

v The file has double-byte literals in the DDS that are used in the file at processing<br />

time (such as constant fields and error messages).<br />

v The DDS of the file includes DBCS keywords. See the DDS Reference for<br />

information on these keywords.<br />

v The file stores double-byte data (database files).<br />

How to indicate a DBCS file<br />

You must indicate that a device file is a DBCS file in order for the system to<br />

process double-byte data properly. You can do this in one of the following ways:<br />

v Through DDS<br />

– DDS provides fields of the following data types.<br />

- DBCS-only fields: display and accept only double-byte characters.<br />

Double-byte characters in a DBCS-only field are enclosed in shift-out and<br />

shift-in characters that have to be paired.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!