Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
98 <strong>File</strong> <strong>Management</strong> V4R5<br />
When you specify *BLDKEY on the FROMKEY or TOKEY parameter, none of the<br />
*BLDKEY values can refer to a null-capable field. If they do, the system sends an<br />
error message.<br />
Different CCSIDs used by record keys (FROMKEY and TOKEY)<br />
When you use the number of key fields and a value to specify the FROMKEY or<br />
TOKEY parameter, the copy command does not make any CCSID conversions to<br />
the input string.<br />
When *BLDKEY is specified on the FROMKEY or TOKEY for character,<br />
DBCS-open, DBCS-either, or DBCS-only fields, the value specified is assumed to be<br />
in the CCSID of the process in which the copy command is running. The copy<br />
command converts each of these key values from the job CCSID to the CCSID of<br />
the from-file key field. If no conversion table is defined or an error occurs while<br />
converting the input key value, a message is sent and the copy operation ends. If<br />
the value can be correctly converted, the converted value is used to build the key<br />
value that determines the first and last record to be copied.<br />
DBCS-graphic fields used by record keys (FROMKEY and<br />
TOKEY)<br />
When the number of key fields and a value are used to specify the FROMKEY or<br />
TOKEY parameter, no conversions are done on the input string. The input string is<br />
used as is.<br />
When you specify *BLDKEY on the FROMKEY or TOKEY for DBCS-graphic fields,<br />
you should enclose the DBCS data in shift-out and shift-in characters. The copy<br />
command assumes that the DBCS data is in the associated DBCS CCSID of the job<br />
CCSID. The shift-out and shift-in characters are removed before building the key. A<br />
message is sent and the copy operation ends:<br />
v If the input string is not enclosed in shift-out and shift-in (SO-SI) characters OR<br />
v The data cannot be converted to the DBCS CCSID of the from-file key field<br />
Selecting a specified number of records (NBRRCDS<br />
Parameter)<br />
Note: You can use this parameter on the following commands: CPYF,<br />
CPYFRMDKT, CPYFRMQRYF, CPYFRMTAP, CPYTODKT, and CPYTOTAP.<br />
When you specify a FROMKEY or FROMRCD parameter, you can specify the<br />
number of records (NBRRCDS parameter) to be copied instead of the TOKEY or<br />
TORCD parameter. You cannot specify both the NBRRCDS and the TORCD or<br />
TOKEY parameters. The specified number of records is copied starting with the<br />
specified from-key value or from-record number.<br />
You can specify the NBRRCDS parameter without specifying the FROMKEY or<br />
FROMRCD parameter. The copy command copies records by starting with the first<br />
record in the file. Note that the number of records specified is the number of<br />
records actually copied to the to-file, which includes<br />
v Deleted records in the from-file if COMPRESS(*NO) is specified, but DOES NOT<br />
INCLUDE<br />
v Records excluded by the INCCHAR and INCREL parameters