Purging Data From Files; Renaming And Moving Files With Alternate Keys - HP Guardian User Manual

Hide thumbs Also See for Guardian:
Table of Contents

Advertisement

Using FUP for Advanced File Management
Using the LOAD Command
To load data into a file, enter LOAD followed by the name of the file that contains the
data, a comma, and the name of the file to be loaded. This example shows how to load
data stored on magnetic tape into a disk file. The name of the file to be loaded is:
$VOL1.SVOL.PART
PART is a key-sequenced file with three partitions. The secondary partitions are on
volumes $VOL2 and $VOL3. The records to be loaded into this file are 128 bytes in
length, on magnetic tape in unsorted order, with one record per block on the tape. The
tape is mounted on the tape drive named $TAPE.
To load the file, enter:
-VOLUME $VOL1.PARTFILE.PART
-LOAD $TAPE, PART
When the LOAD command executes, the records from tape are first read, then sorted by
primary key. After the records are sorted, FUP loads them into the partitions using the
key specifications contained in the file label of PART. (Specify SORTED if the records
are already sorted to avoid the time required to sort the file.)
You can include a number of options in a LOAD command. See the description of the
LOAD command in the File Utility Program (FUP) Reference Manual for more
information.

Purging Data From Files

Use the PURGEDATA command to purge data from a file without deleting the file.
When you enter the PURGEDATA command, the end-of-file (EOF) pointer is set to 0,
and other file-label values indicating the size of the file are reset to indicate that the file
is empty. PURGEDATA does not, however, change the attributes of the file.
Enter PURGEDATA followed by a file name, a file set, or a file-set list. This example
purges the data from a file set of two disk files:
-PURGEDATA ($VOL1.XDATA.FILE0, $VOL2.XDATA.FILE1)

Renaming and Moving Files With Alternate Keys

Renaming or moving a file that has alternate keys is complicated by the fact that the
names of alternate-key files are attributes of the primary-key file. The file label of the
primary-key file contains information about the alternate-key files, such as the file name
and number specified as the ALTFILE attribute. When you rename or move either a
primary-key file or an alternate-key file, you must record the change in the file label of
the appropriate primary-key file.
To rename or move a file that has an alternate key:
Use the FUP RENAME or DUPLICATE command to rename or move the file or
files.
Guardian User's Guide —425266-001
8- 16
Purging Data From Files

Advertisement

Table of Contents
loading

Table of Contents