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.

Year 2000 support: date, time, and timestamp considerations<br />

The CPYF and CPYFRMQRYF commands support the PACKED (P), ZONED (S),<br />

and CHARACTER (A) datatypes that have a DATFMT keyword specified in a<br />

logical file.<br />

The copy converts data from or to a format implied by the length of a ZONED or<br />

PACKED field and the current job’s DATFMT specification. Copy already supports<br />

ZONED fields with length 5,0 or 6,0 (depending on the current job DATFMT)<br />

from/to DATE fields.<br />

FMTOPT(*MAP) allows copying between DATE field types and PACKED, ZONED,<br />

and CHARACTER field types in a logical or physical file provided the lengths,<br />

formats, and values can be converted. FMTOPT(*MAP) is required in these cases<br />

for conversion to the to-field type (and format and separator if it applies). There<br />

are rules as to what form and length these field types must be in (dependent on<br />

the current job’s DATFMT) for successful conversions.<br />

New conversion possibilities exist for when you are:<br />

v “Copying FROM logical file ZONED, CHARACTER, or PACKED field (with a<br />

DATFMT) TO a DATE field in a physical to-file”.<br />

v “Copying FROM or TO a ZONED or PACKED field (that has no DATFMT) TO<br />

or FROM a DATE type field” on page 132.<br />

You also should know the system’s restrictions on the conversions for Year 2000<br />

support. See “Restrictions for Year 2000 support” on page 134 for more information.<br />

The conversions involving CHARACTER fields from/to DATE fields do not<br />

change from existing support except that the logical file CHARACTER fields<br />

having a DATFMT specified are copied to a DATE field in a physical to-file. The<br />

system correctly converts the data.<br />

Copying FROM logical file ZONED, CHARACTER, or PACKED<br />

field (with a DATFMT) TO a DATE field in a physical to-file<br />

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

For these mappings, the format of the from-field is specified and is explicitly<br />

converted to the to-file DATE fields. These copies are single directional only:<br />

FROM the logical file ZONED, PACKED, or CHARACTER field TO a physical file<br />

DATE field.<br />

The system allows century digit (C) in some of the forms. When the (C) value is 0,<br />

the system assumes the year is in the 1900s. When the (C) value is 1, the system<br />

assumes the year to be in the 2000s.<br />

FLD TYPE DATFMT SPECIFIED<br />

FIELD<br />

LENGTH<br />

COPY DATA TYPE FORMAT<br />

ZONED (*MY) 4,0 —> DATE (any)<br />

ZONED (*YM) 4,0 —> DATE (any)<br />

ZONED (*MYY) 6,0 —> DATE (any)<br />

ZONED (*YYM) 6,0 —> DATE (any)<br />

(*JUL) 5,0 —> DATE (any)<br />

ZONED 1

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

Saved successfully!

Ooh no, something went wrong!