![HP Guardian Скачать руководство пользователя страница 140](http://html.mh-extra.com/html/hp/guardian/guardian_user-manual_165061140.webp)
Using FUP for Advanced File Management
Guardian User’s Guide — 425266-001
8- 18
Adding Alternate Keys to Files
PARTONLY option means that only primary or secondary partitions that reside on
$VOL1 are duplicated; partitions on other volumes are not copied. The SAVEALL
option preserves the user ID, timestamp, and security setting for each file.
Adding Alternate Keys to Files
As your databases grow and change, you may need to add new keys to existing files.
The steps for adding an alternate key to a file that already has alternate keys, and to a
file that does not have alternate keys, are shown in the following examples.
Adding an Alternate Key in an Existing Alternate-Key File
For this example, suppose that you have a file named $VOL1.SVOL.PRIFILE. This file
has an alternate-key file named $VOL1.SVOL.AFILE. You want to add the alternate-
key records for the new key field to this file.
The key specifier for the new key is NM, the key offset in the record is 4, and the key
length is 20. To add the new alternate key, enter:
The LOADALTFILE command loads the alternate-key records for key specifier NM
and any other alternate keys into the alternate-key file. To allow for future growth of the
file, you can reserve empty space in index blocks by specifying a percentage of slack
space with the LOADALTFILE ISLACK option.
However, when you add a new alternate key, the length of the key can be no longer than
the longest key already in the alternate-key file unless you:
•
Use the SET LIKE command to duplicate the attributes of the old alternate-key file.
•
Specify the new alternate key with the ALTER command.
•
Specify a new record and key length for the alternate-key file that is 2 + length of
the primary key + length of the longest alternate key.
For example, suppose that the file PRIFILE in the previous example has one alternate
key that is 15 bytes long. The primary-key length is 40 bytes. The name of the alternate-
key file is $VOL1.SVOL.ALTFILE. You can add a new alternate key, NM, with a
length of 20 bytes by entering:
Here, the new record and key lengths must be 62 bytes (2 for the key specifier, plus 20
for the longest alternate key, plus 40 for the primary key).
-VOLUME $VOL1.SVOL
-ALTER PRIFILE, ALTKEY ( "NM", KEYOFF 4, KEYLEN 20 )
-LOADALTFILE 0, PRIFILE, ISLACK 10
-VOLUME $VOL1.SVOL
-ALTER PRIFILE, ALTKEY ( "NM", KEYOFF 15, KEYLEN 20 )
-SET LIKE ALTFILE
-PURGE ALTFILE!
-SET REC 62
-SET KEYLEN 62
-CREATE ALTFILE
-LOADALTFILE 0, PRIFILE
Содержание Guardian
Страница 24: ...About This Guide Guardian User s Guide 425266 001 xxii Your Comments Invited ...
Страница 30: ...Part I Using the Compaq Tandem Advanced Command Language TACL Guardian User s Guide 425266 001 ...
Страница 100: ...Part II Managing Files Using the File Utility Program FUP Guardian User s Guide 425266 001 ...
Страница 146: ...Part III Managing Disk and Tape Processes Guardian User s Guide 425266 001 ...
Страница 232: ...Backing Up and Restoring Disk Information Guardian User s Guide 425266 001 11 26 Backcopy Examples ...
Страница 234: ...Part IV Using the Spooler and Its Utilities Guardian User s Guide 425266 001 ...
Страница 248: ...Introduction to the Spooler Guardian User s Guide 425266 001 12 14 Sending Output to a SPOOL DEFINE ...
Страница 300: ...Performing Routine Spooler Operations Using Spoolcom Guardian User s Guide 425266 001 14 38 Problem Solving Summary ...
Страница 322: ...Part V Security Features and Other Guardian Utilities Guardian User s Guide 425266 001 ...
Страница 368: ...Monitoring Event Messages Guardian User s Guide 425266 001 17 14 Using the Event Viewer ...
Страница 378: ...Displaying Version and System Information Guardian User s Guide 425266 001 18 10 Task 2 Interpret SYSINFO Output ...
Страница 410: ...Monitoring Hardware Components Guardian User s Guide 425266 001 19 32 Automating System Monitoring ...
Страница 460: ...Index Guardian User s Guide 425266 001 Index 24 Special Characters ...