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 display support 208 File Management V4R5 The following sections describe information on displaying double-byte characters. “Inserting shift-control double-byte characters” “Number of displayed extended double-byte characters” “Number of DBCS input fields on a display” “Effects of displaying double-byte data at alphanumeric work stations” on page 209 Inserting shift-control double-byte characters The system inserts shift-control characters into DBCS-only fields automatically. To insert shift-control characters into open fields or either fields, do the following: 1. Position the cursor in the field in which you want to insert double-byte data. 2. Press the Insert Shift Control Character key (according to your DBCS display station user’s guide). The system inserts a pair of shift-control characters at the same time, as follows (where 0E represents the shift-out character and 0F represents the shift-in character): 0E0F The system leaves the cursor under the shift-in character and puts the keyboard in insert mode. Insert double-byte characters between the shift-control characters. To insert double-byte characters, start keying in double-byte characters at the cursor position. For example, enter the double-byte character string D1D2D3, as follows (where 0 E represents the shift-out character, 0 F represents the shift-in character, and D1, D2, and D3 represent three double-byte characters): 0 ED1D2D30 F To find out if a field already has the shift-control characters, press the Display Shift Control Character key. DBCS-graphic fields store double-byte characters without requiring the use of shift control characters. Shift control characters should not be inserted in graphic fields. Number of displayed extended double-byte characters The system can display up to 512 different extended characters on a Japanese display at one time. Additional extended characters are displayed as undefined characters. However, the additional extended characters are stored correctly in the system. Number of DBCS input fields on a display The use of DBCS input fields affects the total number of input fields allowed on a display. For a local 5250 display station, you can specify as many as 256 input fields. However, each three instances of a DBCS field reduces the maximum

number of fields by one. For example, if there are 9 DBCS fields on a display, then the maximum is 256 − (9/3) = 253 input fields. Effects of displaying double-byte data at alphanumeric work stations Copying DBCS files Alphanumeric display stations cannot display double-byte data correctly. If you try to display double-byte data at an alphanumeric display station, the following happens: v The system sends an inquiry message to that display station, asking whether you want to continue using the program with double-byte data or to cancel it. v If you continue using the program, the system ignores the shift-control characters and interprets the double-byte characters as though they were single-byte characters. Displayed double-byte data does not make sense. You can copy both spooled and nonspooled DBCS files. “Copying spooled DBCS files” “Copying nonspooled DBCS files” Copying spooled DBCS files Copy spooled files that have double-byte data by using the Copy Spooled File (CPYSPLF) command. However, the database file to which the file is being copied must have been created with the IGCDTA(*YES) value specified. When copying spooled files to a database file that contains double-byte data, an extra column is reserved for the shift-out character. This shift-out character is placed between the control information for the record and the user data. The following table shows the shift-out character column number, based on the value specified for the Control Character (CTLCHAR) keyword: CTLCHAR Value Column for Shift-Out Character *NONE 1 *FCFC 2 *PRTCTL 5 *S36FMT 10 Copying nonspooled DBCS files You can use the Copy File (CPYF) command to copy double-byte data from one file to another. When copying data from a double-byte database file to an alphanumeric database file, specify one of the following on the CPYF command: v If both files are source files or if both files are database files, you can specify either the FMTOPT(*MAP) parameter or the FMTOPT(*NOCHK) parameter. v If one file is a source file and the other file is a database file, specify the FMT(*CVTSRC) parameter. Appendix B. Double-byte character set support 209

number of fields by one. For example, if there are 9 DBCS fields on a display, then<br />

the maximum is 256 − (9/3) = 253 input fields.<br />

Effects of displaying double-byte data at alphanumeric work<br />

stations<br />

Copying DBCS files<br />

Alphanumeric display stations cannot display double-byte data correctly. If you try<br />

to display double-byte data at an alphanumeric display station, the following<br />

happens:<br />

v The system sends an inquiry message to that display station, asking whether<br />

you want to continue using the program with double-byte data or to cancel it.<br />

v If you continue using the program, the system ignores the shift-control<br />

characters and interprets the double-byte characters as though they were<br />

single-byte characters. Displayed double-byte data does not make sense.<br />

You can copy both spooled and nonspooled DBCS files.<br />

“Copying spooled DBCS files”<br />

“Copying nonspooled DBCS files”<br />

Copying spooled DBCS files<br />

Copy spooled files that have double-byte data by using the Copy Spooled <strong>File</strong><br />

(CPYSPLF) command. However, the database file to which the file is being copied<br />

must have been created with the IGCDTA(*YES) value specified.<br />

When copying spooled files to a database file that contains double-byte data, an<br />

extra column is reserved for the shift-out character. This shift-out character is<br />

placed between the control information for the record and the user data. The<br />

following table shows the shift-out character column number, based on the value<br />

specified for the Control Character (CTLCHAR) keyword:<br />

CTLCHAR Value Column for Shift-Out Character<br />

*NONE 1<br />

*FCFC 2<br />

*PRTCTL 5<br />

*S36FMT 10<br />

Copying nonspooled DBCS files<br />

You can use the Copy <strong>File</strong> (CPYF) command to copy double-byte data from one<br />

file to another.<br />

When copying data from a double-byte database file to an alphanumeric database<br />

file, specify one of the following on the CPYF command:<br />

v If both files are source files or if both files are database files, you can specify<br />

either the FMTOPT(*MAP) parameter or the FMTOPT(*NOCHK) parameter.<br />

v If one file is a source file and the other file is a database file, specify the<br />

FMT(*CVTSRC) parameter.<br />

Appendix B. Double-byte character set support 209

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

Saved successfully!

Ooh no, something went wrong!