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.

elationship. However, the copy operation continues until enough violations<br />

(recoverable errors) have occurred so that the ERRLVL value has been reached. If<br />

this value is exceeded, the copy operation ends.<br />

You can use the ERRLVL parameter to bring files with constraint relationships in<br />

check pending status back into non-check pending status. Do this by setting up the<br />

dependent to-file with constraints that are the same as the dependent from-file.<br />

Then, use a CPYF command with the ERRLVL(*NOMAX) to copy all valid records.<br />

The to-file should not contain any records. The copy command does not insert into<br />

the to-file any records that it encounters from the from-file that would cause the<br />

to-file constraints to go to check pending status. With ERRLVL set to *NOMAX, the<br />

copy command processes all records in the from-file.<br />

Other copy commands (CPYSRCF, CPYFRMTAP, CPYTOTAP, CPYFRMDKT, and<br />

CPYTODKT) end immediately if the systems signals one of the recoverable errors<br />

because there is no ERRLVL parameter for them.<br />

Preventing date, time, and timestamp errors when copying<br />

files<br />

124 <strong>File</strong> <strong>Management</strong> V4R5<br />

For FMTOPT(*MAP), FROMKEY with *BLDKEY, TOKEY with *BLDKEY, and<br />

INCREL parameters, 2-digit year-date fields or values will be assumed to have:<br />

v A century of 19 if the year is in the range from 40 to 99 OR<br />

v A century of 20 if the year is in the range from 00 to 39<br />

For example, 12/31/91 is considered December 31, 1991, while 12/31/38 is<br />

considered December 31, 2038.<br />

However, any from-files containing 2-digit year-date fields with actual internal<br />

date values outside the range January 1, 1940 to December 31, 2039 cause input<br />

mapping errors, and the copy operation fails.<br />

When FMTOPT(*MAP) is used to convert or copy a from-file field date value in a<br />

4-digit year form to a 2-digit year form, the from-file field value must be within<br />

the range of January 1, 1940 to December 31, 2039. Otherwise, a mapping error<br />

occurs, and the copy command sets the to-file field with its default value.<br />

Likewise, when using a 4-digit year date as a record selection input string on<br />

FROMKEY with *BLDKEY or TOKEY with *BLDKEY, the value must be within the<br />

same range if the corresponding from-file field is a date field with a 2-digit<br />

year-date. Otherwise, an error occurs. INCREL record selection is the exception to<br />

this rule, as 4-digit year date values outside this range may be used for<br />

corresponding 2-digit year-date fields.<br />

See “Mapping considerations using Copy” for details about how to handle<br />

different field types and formats.<br />

Mapping considerations using Copy<br />

When mapping a character field to a date, time, or timestamp field and a format<br />

form is being used in the character field, leading zeros may be omitted from<br />

month, day, and hour parts. Microseconds may be truncated or omitted entirely in<br />

the character field.

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

Saved successfully!

Ooh no, something went wrong!