The benefits gained from purging files will be seen immediately in:
-
A reduction in disk space
-
Less time to do
STEP 1 - PREPARING FOR THE PURGE
o Run a Batch File Inventory
The batch file inventory will list all the defined periods in the system. You must decide on the amount of data to purge from your system.
o Backup
-
TSC source code and
-
All data
Mark your backup tape clearly and set it aside. Do not return the tape to the regular backup schedule as this tape is the archive of your data files. If you ever need to access the purged data you can restore the programs and the data files whenever necessary.
o Make sure
you have the necessary disk space available. (3 - 4 times the size of the file you are purging.)
STEP 2 - THE PURGE
BAS
Purge files in the following order. Some files are dependent on other files being present. The order is critical, please follow the list.
MAIN FILE PURGES
-
8,6,1 PO Master File Purge
-
8,6,4 Cheque File Purge
-
8,6,2 Invoice Master File Purge
-
8,6,3 Journal Entry Audit File Purge
-
8,6,5 GL Master File Purge
-
8,6,6 GST File Purge
OTHER BAS FILE PURGES
These purges may be run at any time and in any order.
-
8,6,7 Budget Audit Trail File Purge
-
8,6,8 Vendor Audit File Purge
-
8,6,9 Vendor File Purge
-
8,6,10 Suspended Invoice Audit Trail Purge
OPS
OPTION FILES
4,3,3 To-Date History File Purge PRYDØ1.DAT
4,3,4 Time Sheet File Purge PRBAØ1.DAT & PRBTØØ.DAT 4,3,6 UIC History File Purge PRUIØ1.DAT
4,3,7 UIC Timesheet File Purge PRUIØ2.DAT 4,3,9 GL History File Purge PRGHØ1.DAT
The To-Date History File Purge and Time Sheet File Purge automatically generate a .HST files (eg: PRYDØ1.HST) containing the purged records.
All other purge options include an optional generation of the .HST files.
OPS FILE COMPRESSIONS FILES
|
4,3,5 |
UIC History File Compression |
PRUIØ1.DAT |
|
4,3,8 |
GL History File Compression |
PRGHØ1.DAT |
|
4,3,10 |
Storage Bank File Compression |
PRBSØ1.DAT |
|
4,3,11 |
Pool Bank File Compression |
PRBPØ1.DAT |
Compress of history records reduces the over all size of a files without completely removing the information from the system.
All compression options include an automatic file optimization.
MAR
-
Purge Paid Transactions
STEP 3 - FILE OPTIMIZATION
The process FILE OPTIMIZATION will rebuild one or more files, reducing the fragmentation, reclaiming any lost disk space, and optimizing the structure of the file.
The optimization process can be run in two ways. An interactive program which prompts for all required parameters, or a command file can be created and submitted from the DCL level manually.
A log file will be created listing each file with the file size both before and after processing.
NOTE: This procedure will lock each file during optimization. The files must not be accessed by any other users during processing. We recommend that file optimization be done at night when the system is not in use.
INTERACTIVE PROCEDURE:
To run the interactive program, first access the TSC main menu and exit to DCL. Enter the following command:
$RUN SRB$GLBEXE:XXOPØ1
Select the desired batch queue and output device.
Set the time to run so that the job will execute when no other users will be on the system.
You will be prompted for the following information:
ENTER THE MINIMUM ALLOWABLE DISK SPACE:
Enter the minimum amount of disk space that must exist on the disk when converting the file. The disk space required is 3 - 4 times the size of the data file.
This will prevent the disk from running out of space during processing. The default is 20,000 blocks.
ENTER THE ALTERNATE DISK AND DIRECTORY<SAME AS ORIG>
This optional parameter is used to specify an alternate disk and directory to be used during the conversion. This allows files to be optimized on disks with only small amounts of disk space. Also, the processing time can be reduced considerably by distributing the disk I/O between two disks. The disk directory specified must exist and the protection must allow you to access the contents.
ENTER FILE TO CONVERT(WILDCARDS ALLOWED)<END>
Enter the name of the data file that you want to optimize. You can use wildcards (BA*.DAT). This wildcard allows you to specify that all files beginning with 'BA' and ending with '.DAT' are to be included. This prompt will be asked continuously allowing the entry of multiple filenames until a blank filename is entered.
COMMAND FILE PROCEDURE:
Create a DCL command file which calls the OPTIMIZE procedure, passing all required parameters in the following format:
$ @ disk:[ directory] OPTIMIZE f ile_ spec min_ disk_ size alt_ disk
disk - The TSC software disk name. directory - The TSC global executable directory.
(e.g. [SRB.GLBØ11Ø.EXE])
file_spec - The name of the data file that you want to optimize. You can use wildcards (BA*.DAT), but not a list (BAGLØØ.DAT,BAJEØØ.DAT)
min_disk_size - The minimum amount of disk space that must exist on the disk when converting the file. The default is 20,000 blocks.
alt_disk - This optional parameter is used to specify an alternate disk and directory to be used during the conversion. This allows files to be optimized on disks with only small amounts of disk space as well as distributing the disk I/O between two disks.
EXAMPLE :
@DIA1:[SRB.GLBØ11Ø.EXE]OPTIMIZE DIA1:[LIVE.BAS.DATA]*.DAT 30000
In this example all files in the BAS data directory with a ".DAT" extension will be optimized. The disk DIA1 may not be reduced to less than 30,000 blocks during the optimization process. No alternate disk was specified so all processing will be done on the disk DIA1.
The following files are large and will benefit the most from optimization:
INVOICE FILE BAIEØ1.DAT
JOURNAL ENTRY FILE BAJEØØ.DAT
PURCHASE ORDER FILES BAPOØ1.DAT, BAPOØ2.DAT, BAPOØ3.DAT
GST FILES BAGSØØ.DAT