Modifying Partitioned Files - HP Guardian User Manual

Hide thumbs Also See for Guardian:
Table of Contents

Advertisement

Using FUP for Advanced File Management
Adding an Alternate Key in a New Alternate-Key File
To add an alternate key to the file:
1. Create a new alternate-key file:
-VOLUME $VOL1.SVOL
-CREATE FILEB, TYPE K, REC 16, KEYLEN 16
-ALTER FILEA, ALTFILE (0, FILEB), ALTKEY ("XY", KEYLEN 10)
-LOADALTFILE 0, FILEA
In this example, the new alternate-key file is named $VOL1.SVOL.FILEB. The key
specifier for the new key is XY, the key offset in the record is 0, and the key length
is 10. This example uses an entry-sequenced file named $VOL1.SVOL.FILEA,
which does not have an alternate-key file
The CREATE command creates the alternate-key file $VOL1.SVOL.FILEB. For
non-unique alternate keys, the record length and key length are 16 bytes (2 for key
specifier, plus 10 for the alternate-key field lengths, plus 4 for the primary key
length). For unique alternate keys (specified by including the UNIQUE option in the
SET ALTKEY command), the key length is 12 bytes (2 for key specifier, plus 10
for alternate-key field lengths), and the record length is 16.
The ALTER command changes the file label for the primary-key file (FILEA) so
that it specifies FILEB as the alternate-key file and contains the key specifier XY.
Finally, the LOADALTFILE command loads the alternate-key records into the
alternate-key file. Note that an index-block slack percentage of 0 is the default
value.

Modifying Partitioned Files

Changing partitioned files involves making changes to specific partitions, then
modifying the attribute of the file to reflect these changes.
Moving a Partition to a New Volume
This example uses a partitioned file named $VOL1.SVOL.PARTFILE. Secondary
partitions of this file reside on volumes $VOL2 and $VOL3. To move the secondary
partition on $VOL2 to the volume $NEW, enter:
-VOLUME $VOL1.SVOL
-DUP $VOL2.PARTFILE, $NEW.*, PARTONLY
-ALTER PARTFILE, PART ( 1, $NEW.SVOL.PARTFILE )
-PURGE $VOL2.PARTFILE
The DUP command with the PARTONLY option copies the secondary partition
$VOL2.SVOL.PARTFILE to $NEW.SVOL.PARTFILE. The ALTER command
changes the file label of the primary partition ($VOL1.SVOL.PARTFILE) to indicate
that the first secondary partition resides in the file $NEW.SVOL.PARTFILE.
Guardian User's Guide —425266-001
8- 19
Modifying Partitioned Files

Advertisement

Table of Contents
loading

Table of Contents