REPACK SET [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
REPACK SET
Rebuilds a detail data set by removing gaps left by deleted entries and
by adjusting pointers.
Syntax
REP[ACK] SET DataSetName {SERIAL } [SetCapacity]
{CHAINED [(SearchItemName) ]}
[(BlockFactor) ] [DeviceClass]
Parameters
DataSetName is the name of the detail data set to be repacked.
If a master data set name is used, DBChange returns
an error message stating that only detail data sets
can be repacked.
SERIAL is used to serially rebuild the detail data set.
This option eliminates space left by deleted entries
and adjusts the pointers while preserving both the
serial order of the data set and the chronology of
every chain for each path.
CHAINED is used to reorganize the data set entries according
to the values for the search item you specify with
the SearchItemName. This option preserves the
chronology of every chain.
(SearchItemName) is the name of the search item to be used. If this
parameter is omitted, the search item of the primary
path is used. This must be a valid path or valid
search item; that is, it has not been deleted or
newly added.
SetCapacity is the new capacity for the repacked detail data
set. The capacity must be less than 231 -1
(2,147,483,647). If this parameter is omitted, the
detail data set capacity is not changed.
(BlockFactor) is the new blocking factor for the repacked detail
data set. When determining the blocking factor,
remember that the resulting block size must not be
larger than the maximum block size for the data set.
That is, if the media record is 6 words and the
maximum block size is 85, the blocking factor cannot
be greater than 14 (85/6=14). If this parameter is
omitted, the detail data set blocking factor is not
changed.
DeviceClass is the new device class for the repacked detail data
set. If this parameter is omitted, the detail data
set device class is not changed.
Description
Use this command to rebuild a detail data set. This command eliminates
deleted entry gaps and adjusts pointers.
To verify a pending REPACK SET command, use the REVIEW SETS command. If
you want to cancel the data set repack, use the CANCEL REPACK command
before running the DBAPLUS program.
Refer to chapter 8, "Maintaining the Database," for more information
about repacking data sets.
Example 1
>base orders
>repack set sales serial
Repack Set issued for data set.
>perform commands
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
TUE, MAY 29, 1990, 11:10 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N]? y
Data Set SALES : 17 entries repacked successfully.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
In this example, the BASE command is issued for the ORDERS database. The
REPACK SET command is issued, specifying a serial repack for the data set
SALES. To repack the data set interactively, the PERFORM COMMANDS command
is issued. The DBCPLUS program asks if changes should be performed
online or if a job file should be created. Because the database has been
modified since the last DBSTORE, DBAPLUS asks if you wish to continue.
When the data set has been successfully repacked, a message is displayed
stating the number of entries successfully repacked. The DBChange prompt
is returned.
Example 2
>base orders
>repack set inventory chained (lastshipdate) 100 (4)
REPACK SET issued for data set.
>perform commands
Please wait ... change file is being verified.
PERFORM COMMANDS now or create job file [job/y/N]? y
Please wait ...
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
WED, MAY 30, 1990, 10:00 AM
Database has been modified since last DBSTORE (DBA 220).
Continue [y/N] ? y
PAGE 1 HEWLETT-PACKARD 30391C.02.00 TurboIMAGE/3000: DBSCHEMA
WED, MAY 30, 1990, 10:00 AM (C) HEWLETT-PACKARD CO. 1987
BEGIN DATABASE ORDERS;
PASSWORDS:
11 CREDIT ;
12 BUYER ;
13 SHIP-REC;
14 CLERK ;
18 DO-ALL ;
ITEMS:
ACCOUNT , I4(0,11,12,13,14,18/);
BINNUM , Z2(/13);
:
SETS:
:
NAME: INVENTORY ,D(12,14/13,18);
ENTRY: STOCK# ( PRODUCT ),
ONHANDQTY ,
SUPPLIER (!SUP-MASTER ),
UNIT-COST ,
LASTSHIPDATE ( DATE-MASTER ),
BINNUM ;
CAPACITY: 100(4); <---- capacity and blocking factor changed
END.
:
DATA SET TYPE FLD PT ENTR MED CAPACITY BLK BLK DISC
NAME CNT CT LGTH REC FAC LGTH SPACE
DATE-MASTER A 1 3 3 26 365 19 496 96
CUSTOMER M 9 1 43 54 201 10 541 112
PRODUCT M 2 2 14 31 300 16 497 80
SUP-MASTER M 5 1 31 42 201 12 505 80
INVENTORY D 6 3 20 32 100 4 129 64 <---- capacity
SALES D 8 4 21 37 500 10 371 160 and blocking
TOTAL DISC SECTORS INCLUDING ROOT: 624 factor
changed
NUMBER OF ERROR MESSAGES: 0
ITEM NAME COUNT: 23 DATA SET COUNT: 6
ROOT LENGTH: 1176 BUFFER LENGTH: 541 TRAILER LENGTH: 256
ROOT FILE ORDERS CREATED.
New database schema is saved as temporary file ORDERSSC
Temporary file created for set INVENTORY.
Data set DATE-MASTER : No conversion necessary.
Data set CUSTOMER : No conversion necessary.
Data set PRODUCT : No conversion necessary.
Data set SUP-MASTER : No conversion necessary.
Data set INVENTORY : 5 entries expected.
Data set INVENTORY : 5 entries repacked successfully.
Data set SALES : No conversion necessary.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
In this example, the BASE command is issued for the ORDERS database. The
REPACK SET command is issued, specifying a chained repack for the detail
data set INVENTORY on the search item LASTSHIPDATE. The capacity is
changed to 100 and the blocking factor is changed to 4.
After issuing a PERFORM COMMANDS to actually repack the data set, the
schema is printed along with messages about the status of the repack. In
this case, five entries were successfully repacked.
MPE/iX 5.0 Documentation