Preventing errors when copying files
You can prevent many copy errors when you plan for certain conditions and situations ahead of time.
- Limitation of recoverable errors during copy
When you copy to or from a database file or from a tape file, you can limit the number of recoverable errors that you accept before the copy ends. Use the ERRLVL parameter to specify this limit.
- Prevention of date, time, and timestamp errors when copying files
For FMTOPT(*MAP), FROMKEY with *BLDKEY, TOKEY with *BLDKEY, and INCREL parameters, 2-digit year-date fields or values will be assumed to have a century of 19 if the year is in the range from 40 to 99, or a century of 20 if the year is in the range from 00 to 39.
- Prevention of position errors when copying files
When the copy file function cannot locate the first record to copy in the from-file member, a position error occurs.
- Prevention of allocation errors when copying files
The i5/OS® operating system places locks on the from-file and the to-file when you copy files. To prevent allocation errors when copying files, you can place stronger locks on those files.
- Prevention of copy errors that result from constraint relationships
A constraint relationship is a mechanism to ensure data integrity between a dependent file and a parent file. You need to pay attention to the constraint relationship when copying files.
- Copy operation on files not in check-pending status
When the parent or dependent file has an established constraint relationship that is not in check-pending status, the rules described in this topic apply.
- Copy operation on files in check-pending status
When the parent or dependent file has an established constraint relationship that is in check-pending status, the rules described in this topic apply.
- Prevention of copy errors related to your authority to files
The table in this topic summarizes the authority that is required for the from-file and the to-file.
Parent topic:
Performance
Related concepts
Printing records (PRINT, OUTFMT, and TOFILE(*PRINT) parameters)