Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CCSIDs<br />
v The data from the from-file is read into a buffer by the CCSID of the<br />
from-file. The data in the buffer is checked and written to the to-file. The<br />
CCSID of the open to-file is set to the value of the from-file, unless a<br />
to-file CCSID is used. If a to-file CCSID is used, the data is converted to<br />
that CCSID. If the from-file is a tape file, and the FROMCCSID(*FILE) is<br />
specified, the following limits apply:<br />
– The job CCSID is used or<br />
– The from-file CCSID is requested by the user<br />
v The character data (delimiters) passed on the command are converted to<br />
the CCSID of the from file. This allows the character data of the<br />
from-file and command parameters to be compatible.<br />
Date Field<br />
v All date formats supported by AS/400 can be imported (*ISO, *USA,<br />
*EUR, *JIS, *MDY, *DMY, *YMD, *JUL, and *YYMD).<br />
v You can copy a date field to a timestamp field.<br />
Time Field<br />
v All time formats supported by AS/400 can be imported (*ISO, *USA,<br />
*EUR, *JIS, *HMS).<br />
v You can copy a time field to a timestamp field.<br />
Date and Time Separators<br />
The system supports all valid separators for date and time fields.<br />
Timestamp Field<br />
Timestamp import fields must be 26 bytes. The import ensures that periods<br />
exist in the time portion, and a dash exists between the date and time<br />
portions of the timestamp.<br />
Number of Fields Mismatch<br />
If the from-file or to-file do not have the same number of fields, the data is<br />
either truncated to the smaller to-file size, or the extra to-file fields will<br />
receive a null value. If the fields cannot contain null values, the system<br />
issues an error message.<br />
Multiple Jobs<br />
The number of jobs that are used to copy the data depends on the<br />
DEGREE(*NBRTASKS) parameter of the CHGQRYA command. When<br />
multiple jobs are used, the system uses batch jobs to copy the data. The<br />
user can change, hold or end these batch jobs. The copy does not complete<br />
until all the started batch jobs complete.<br />
The relative record numbers can be maintained only if a single job is used<br />
and the import file does not contain any deleted records. If the from-file is<br />
a distributed physical file or logical file, the system performs the copy in a<br />
single process.<br />
<strong>File</strong>s with less than 50,000 records use only one job.<br />
Fixed formatted import file<br />
Below is an example of a Field Definition <strong>File</strong> that describes the fixed formatted<br />
file:<br />
-*********************************************************/<br />
-**** Field Definition <strong>File</strong> */<br />
-*********************************************************/<br />
Chapter 4. Copying files 145