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.

Special considerations for the Override Database <strong>File</strong><br />

(OVRDBF), Override Diskette <strong>File</strong> (OVRDKTF), and Override<br />

Tape <strong>File</strong> (OVRTAPF) commands<br />

For a database from-file or to-file, if a MBR parameter is specified on an OVRDBF<br />

(Override Database <strong>File</strong>) command, then the override member name is used<br />

instead of the value specified on the copy command. If the TOFILE parameter is<br />

specified with no MBR parameter value on the OVRDBF command, then the first<br />

member (in creation order) in the database file is used instead of the member<br />

specified on the copy command. For a diskette or tape from-file or to-file, if a<br />

LABEL parameter is specified on an OVRDKTF or OVRTAPF command,<br />

respectively, the override label name is used instead of the label specified on the<br />

copy command.<br />

If you copy multiple members or labels to corresponding like-named to-file<br />

members or labels, then you cannot use an override to a single to-file member or<br />

label unless you also override the from-file to a single member or label.<br />

How the copy function adds members to the to-file<br />

The copy function adds a member to the to-file when the member does not exist.<br />

The member name used is either the TOMBR parameter value from the copy<br />

command, or the member name that is specified in an override for the to-file.<br />

If TOMBR(*FROMMBR) or TOMBR(*FROMLABEL) is specified on the copy<br />

command (and is not overridden), the from-file member names or label identifiers<br />

are used for the members added to the file.<br />

If TOMBR(*FIRST) is specified on the copy command, or if there is an override<br />

that specifies a TOFILE parameter with no MBR parameter, then no member name<br />

is known. The copy function does not add a member in this case unless the<br />

following are true:<br />

v You specified CRTFILE(*YES) on the copy command<br />

v The copy function must create the to-file<br />

Except for the CPYFRMQRYF command, when the copy function creates the to-file<br />

without a specific member name specified, the from-file name is used for the<br />

member that is added to the to-file. When using the CPYFRMQRYF command, the<br />

member added to the physical file that is created by the copy operation has the<br />

name specified by the TOMBR parameter. If you specify TOMBR(*FIRST), the<br />

to-file member has the same name as the to-file file name that is specified on the<br />

TOFILE parameter of the CPYFRMQRYF command. The copy command ignores<br />

the MBROPT parameter value when it creates the to-file, and adds records to the<br />

new file members.<br />

If the from-file is a database file, the copy command uses the member text and<br />

SEU source type of the from-file member for the member that is added to the<br />

to-file. If the from-file is a device or inline data file, the copy command takes the<br />

text from message CPX0411; the SEU source type is TXT. If both the from-file and<br />

to-file are database source files, the SEU source type information in the added<br />

member will be the same as the from-file member. When it adds the to-file<br />

member, the copy command always assigns the SHARE(*NO) and<br />

Chapter 4. Copying files 91

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

Saved successfully!

Ooh no, something went wrong!