Maintaining your disk files, Loading data into files – HP NonStop G-Series User Manual
Page 137

Using FUP for Advanced File Management
Guardian User’s Guide — 425266-001
8- 15
Maintaining Your Disk Files
Maintaining Your Disk Files
You also use FUP to maintain your disk files after they are created:
All these operations involve changes in the file label of the affected file(s); in some
cases, you must make the file-label changes yourself.
Each disk file has a file label — a record in the file directory that contains all the file
attributes, such as the file name, file type, size of the file (EOF), extent size, names of
partitions for partitioned files, and names of alternate-key files for key-sequenced files
that have alternate keys.
Some file operations automatically change the file label. For example, when you add
data to or delete data from a file, the EOF value in the file label changes accordingly.
For other file operations, however, you must change file-label values yourself. For
example, after you move an alternate-key file, you must change the name of the
alternate-key file in the file label of the primary-key file.
To make changes to the file label, use the FUP ALTER command. Some examples in
this section show file operations for which you must make file-label changes with the
FUP ALTER command. The appropriate ALTER commands are included.
Loading Data Into Files
You can move data between files using these FUP commands:
•
DUP — to duplicate an entire file (the original file and copy must be disk files).
•
COPY — to move data one record at a time. COPY lets you copy records or part of
a file to and from devices other than disks, including tape drives, printers, and
terminals. COPY also lets you change file types by copying a file of one type into a
target file of a different type.
•
LOAD — to move data into a structured file. Data is transferred one record at a time
from the source file and moved one block at a time into the destination file.
The LOAD command has these advantages:
•
Loading files does not affect alternate-key values.
•
Because data is written a block at a time, LOAD is faster than COPY.
Topic
Page
Renaming and Moving Files With Alternate Keys
Copying Files to a Backup Volume
Adding Alternate Keys to Files