Skip to main content
Skip table of contents

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 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)

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    file_spec    min_disk_size    alt_disk

disk

The atrieveERP software disk name.

directory

The atrieve 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 Finance 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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.