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.

You cannot copy DDM files that contain user-defined types to AS/400 systems<br />

running at Version 4 Release 3 or earlier.<br />

Copying files that contain DataLinks<br />

You can specify CRTFILE(*YES) on the CPYF and CPYFRMQRYF commands when<br />

you copy files that contain DataLinks (DLs). If the from-file is an SQL table, view,<br />

or index that contains a DL, these commands create an SQL table.<br />

You cannot copy DDM files that contain DataLinks to AS/400 systems running at<br />

Version 4 Release 3 or earlier.<br />

DLs can be mapped only to other DLs. Therefore, if you specify *NONE, *MAP, or<br />

*DROP on the FMTOPT parameter, the from-file and to-file must have<br />

corresponding DLs. Truncation is not allowed. Shorter DLs, however, can be<br />

converted to longer DLs.<br />

A file can be linked only once on a system. Therefore, a copy that will perform<br />

mapping or that requires the formats to be identical (that is, *NONE, *MAP, or<br />

*DROP is specified on the FMTOPT parameter) will not be successful if<br />

corresponding from-file and to-file fields are both FILE LINK CONTROL. Copies<br />

that are performed using the *NOCHK parameter option are not restricted, but<br />

errors will occur if a DL that references a linked file is copied to a DL that is FILE<br />

LINK CONTROL.<br />

When you specify CRTFILE(*YES) on the CPYF or CPYFRMQRYF command, and<br />

the from-file contains a FILE LINK CONTROL DL field, the following statements<br />

are true, depending on how you specify the FMTOPT parameter:<br />

v If you specify *NONE, *MAP, or *DROP on the FMTOPT parameter, the file is<br />

created, but an error message is issued and no I/O is performed.<br />

v If you specify *NOCHK or *CVTSRC on the FMTOPT parameter, the file is<br />

created and I/O is attempted. The I/O will be unsuccessful for any records that<br />

contain a valid LINK.<br />

The following table shows LINK scenarios associated with the CPYF command<br />

when different FMTOPT values are used.<br />

LINK status for from-field to to-field when<br />

FMTOPT parameter is *MAP or *NONE<br />

FILE LINK CONTROL to FILE LINK<br />

CONTROL<br />

NO LINK CONTROL to FILE LINK<br />

CONTROL (with no truncation)<br />

FILE LINK CONTROL to NO LINK<br />

CONTROL (with no truncation)<br />

NO LINK CONTROL to NO LINK<br />

CONTROL (with no truncation)<br />

Copying files that contain large objects<br />

How linking is performed<br />

Not allowed. <strong>File</strong>s can be linked only once.<br />

Linking is performed.<br />

No linking is performed.<br />

No linking is performed.<br />

You can specify CRTFILE(*YES) on the CPYF and CPYFRMQRYF commands when<br />

you copy files that contain large objects (LOBs). If the from-file is an SQL table,<br />

view, or index that contains a LOB, these commands create an SQL table.<br />

Chapter 4. Copying files 135

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

Saved successfully!

Ooh no, something went wrong!