30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The ERRLVL parameter specifies the maximum number of recoverable errors<br />

allowed for each label pair or each member copied. The value specified for<br />

ERRLVL indicates the total errors that are allowed on both the from-file and the<br />

to-file that are combined for each label pair or each member copied. Each time an<br />

error occurs, the following process runs:<br />

1. The process increases the count for that label pair or that member by 1.<br />

2. A message identifying the last good record that is read or written is printed on<br />

all copy lists if TOFILE(*PRINT), PRINT(*COPIED), or PRINT(*EXCLD) was<br />

specified.<br />

3. The error record is printed if you specified PRINT(*ERROR).<br />

4. Copying continues.<br />

5. If the copy command completely copies the from-file member without<br />

exceeding the limit, the process resets the counter to 0, and the copy of the next<br />

member starts.<br />

6. If the limit is exceeded during the copy of a member, copying ends and a<br />

message is sent, even if more records or members remain to be copied.<br />

For a database from-file, including the open query file, the recoverable errors<br />

are:<br />

v Those that occur when data is converted (mapped) AND<br />

v Those caused by a damaged area on the disk (in auxiliary storage)<br />

For a tape from-file, the recoverable errors are:<br />

v A block length that is not valid AND<br />

v A media-read operation from the tape volume on the device resulting in an error<br />

For a physical to-file, the recoverable errors are:<br />

v Those that occur when data is converted AND<br />

v Those that occur when more than one of the same key is found<br />

Any record that causes an error is not copied to the to-file. For a write error, the<br />

record is printed on a PRINT(*COPIED) and PRINT(*EXCLD) printout. A message<br />

then follows this printout. This message indicates that the record was not actually<br />

copied. If you specified PRINT(*ERROR), the command prints the records that<br />

caused write errors on the *ERROR listing. A message then indicates that an error<br />

occurred. For a read error, no record is available to be printed on the copy<br />

printouts (TOFILE(*PRINT), PRINT(*COPIED), PRINT(*EXCLD), or<br />

PRINT(*ERROR)). However, a message prints on all specified printouts that<br />

indicates that a record could not be read.<br />

When the command cannot read a portion of the file from disk, partial object<br />

damage to the contents of a database file occurs. If a file is damaged in such a way,<br />

you can bypass the records that are in error by copying the good records and<br />

manually adding the records that were not copied because of the damage.<br />

Regardless of the value of the ERRLVL parameter, recoverable errors always<br />

appear in the job log with a reply of “C” for “Cancel.”<br />

For files that have constraint relationships, the ERRLVL parameter only affects the<br />

to-file. If you set the ERRLVL parameter to 0, the copy command does not copy<br />

into the file any record that causes the to-file to violate the constraint relationship.<br />

The copy operation ends. If ERRLVL is greater than 0, the copy command does not<br />

copy into the file any record that causes the to-file to violate the constraint<br />

Chapter 4. Copying files 123

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

Saved successfully!

Ooh no, something went wrong!