30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

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

See “Adding or changing source file sequence number and date fields (SRCOPT<br />

and SRCSEQ Parameters)” on page 120 for source file considerations in this<br />

operation, and “Copying deleted records (COMPRESS Parameter)” on page 103 for<br />

considerations for deleted records.<br />

If MBROPT(*ADD) is specified, records are always physically added at the end of<br />

the file, even if it is a keyed sequence file. In the following illustration, FILEDB1 is<br />

a keyed physical from-file, and FILEDB2 is a keyed physical to-file. The files are<br />

shown as they physically appear in storage. FILEDB2 already has three records in<br />

it.<br />

FILEDB1 FILEDB2<br />

Key Key<br />

6<br />

3<br />

1<br />

7<br />

4<br />

2<br />

5<br />

Keyed Database<br />

From-<strong>File</strong> in<br />

Arrival Sequence<br />

Existing<br />

Records<br />

9<br />

54<br />

24<br />

Keyed Database<br />

To-<strong>File</strong> in Arrival<br />

Sequence<br />

RV2H079-0<br />

If you specify MBROPT(*ADD), FROMKEY(1 2), and TOKEY(1 5), four records are<br />

added in key field order to the end of FILEDB2.<br />

FILEDB1 FILEDB2<br />

Key Key<br />

6<br />

3<br />

1<br />

7<br />

4<br />

2<br />

5<br />

Keyed Database<br />

From-<strong>File</strong> in<br />

Arrival Sequence<br />

Existing<br />

Records<br />

Added<br />

Records<br />

54<br />

24<br />

Keyed Database<br />

To-<strong>File</strong> in Arrival<br />

Sequence<br />

The added records, however, appear to be merged in the new file when viewed<br />

through a keyed sequence access path.<br />

9<br />

2<br />

3<br />

4<br />

5<br />

MBROPT(*ADD)<br />

FROMKEY(1 2)<br />

TOKEY(1 5) RV2H080-0

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

Saved successfully!

Ooh no, something went wrong!