The File Maintenance Facility Compress process compresses
one or more Archive and/or Extract Files, based on user-specified
compression ratio thresholds. The compression ratio thresholds represent
data space savings in percent. For example, a 10 MB file that is compressed
to 2 MB would have a compression ratio of 80 percent.
The Compress process provides table-level
compression using a compression ratio threshold value for each specified
table or a default threshold value (if both are specified, the table-level
threshold overrides the default). When you specify table-level or
default threshold values, Optim™ determines
the compression ratio for each specified table. If a table's
computed compression ratio is less than the table or default threshold
value you specified, Optim disables
compression for that table. In this way, Optim does not attempt to compress row data
from a table that will not result in a significant compression ratio.
If you do not specify a compression ratio threshold value for a table
nor a default value, Optim performs
full compression on that table in all specified files that contain
the table.
The Compress process also compresses (or uncompresses)
a table that had been previously compressed. The process compresses
(or uncompresses) the table based on the specified parameters. For
example, if the specified table-level threshold is higher than the
compression ratio for a table that had been previously compressed,
the Compress process will uncompress the table.
Command File Syntax
The command file contains
parameters that identify the Archive and/or Extract Files to be compressed
and the default and table-level compression ratio thresholds to be
used to determine if compression will occur.
A command may appear
several times in a command file. A single command can span multiple
lines for ease of maintenance (except where noted otherwise). A group
of commands ending with a RUN command represents
a “process block.” Except for the RUN command, all
commands in a process block can appear in any order. See Example for a sample command file.
A
command file may contain one or more process blocks in the following
format:
[// comment ]
[ OPTIMDIR optimdirectory ]
[AF { arcservername | (local) } { archivefilename1[,archivefilenamen | * }]
[COLLECTION collection1[,collectionn]
[AFEXCLUDE archivefilename1[,archivefilenamen]
[XF { servername | (local) } extractfilename1[,extractfilenamen]
[DEFTHRESHOLD { defthreshold | ON | OFF }]
[TABLETHRESHOLD dbalias.cid.tablename { tablethreshold | ON | OFF }]
...
[TABLETHRESHOLD dbalias.cid.tablename { tablethreshold | ON | OFF }]
[ONERROR { CONTINUE | QUITPROCESS | QUITALL }]
[RETAINORIGINAL { YES | NO }]
RUN COMPRESS
- //
- At the beginning of a line, indicates that the text
following the slashes is a comment. Enter comment text on one line,
anywhere in the command file.
- OPTIMDIR
- Optim Directory
to register and/or update Archive Files. The Optim Directory provides complete Archive File
names in case a wild card name is specified. It is used in conjunction
with the AF and COLLECTION commands. The specified AF or COLLECTION
must be in the directory specified by OPTIMDIR. (The default is the
current Optim Directory.)
- AF
- The Archive Files to be processed.
Note: You can
specify either XF or AF in a process block, but not both. You can
use AF and COLLECTION together in a process block.
- filenames
- Server name followed by a comma-separated list of Archive File
names or patterns with wild cards (% for any number
of characters). If a file name contains spaces, use quotes around
the name. The file(s) must exist in the Archive Directory. You can
use multiple occurrences of this command to process Archive Files
on multiple servers. Use the keyword “*” to indicate that all files
in the directory should be processed.
- COLLECTION
- The Archive Files from a collection to be processed. If both AF
and COLLECTION are specified, the final list of Archive Files to be
processed contains only unique files.
- collection
- Comma-separated list of collection names or patterns with wild
cards (% for any number of characters).
- AFEXCLUDE
- The Archive Files to be excluded from compression. If both AF
and COLLECTION are specified, the final list of Archive Files to be
processed contains only unique files. You can use multiple occurrences
of this command to add more file names to exclude.
- filenames
- Comma-separated list of Archive File names to exclude from the
compression list. If a file name contains spaces, use quotes around
the name.
- XF
- The Extract Files to be processed.
Note: You can specify either
XF or AF in a process block, but not both. Also, the XF keyword is
not allowed with the COLLECTION keyword.
- filenames
- Server name followed by a comma-separated list of Extract File
names. Since these files will not be stored in an Optim Directory, you must enter fully qualified
paths to identify the files to be compressed. If a file name contains
spaces, use quotes around the name. You can use multiple occurrences
of this command to process Extract Files on multiple servers.
- TABLETHRESHOLD
- The table compression ratio threshold. The specified integer value
is a minimum compression ratio threshold, which will be compared with
the computed compression ratio of the table sample size (the first
buffer.) If the computed ratio is less than the compression ratio
threshold you specify, Optim deactivates
compression for the table.
- tablename
tablethreshold
- A three-part table name followed by a compression ratio threshold
integer value from 1 to 99, or ON or OFF. ON indicates that the table
will always be compressed. OFF indicates that the table should not
be compressed. 1 to 99 indicate the minimum compression ratio required
to enable table compression. (Command, table name, and threshold value
must all be on the same line.)
- DEFTHRESHOLD
- The default compression ratio threshold value to be used if a
table has no specified compression ratio threshold (TABLETHRESHOLD).
The specified integer value is a minimum compression ratio threshold,
which will be compared with the computed compression ratio of the
table sample size (the first buffer.) If the computed ratio is less
than the default compression ratio you specify, Optim deactivates compression for the table.
- defthreshold
- Default compression ratio threshold, an integer value from 1 to
99, or ON or OFF. ON indicates that the table should be compressed
(default if DEFTHRESHOLD is not specified). OFF indicates that the
table should not be compressed. 1 to 99 indicate the minimum compression
ratio required to enable table compression. (Command, table name,
and threshold value must all be on the same line.)
- ONERROR
- Indicates how Optim will
react to an error.
- CONTINUE
- Processing continues with the next file, if possible.
- QUITPROCESS
- Processing ends with the current process and proceeds
to the next.
- QUITALL
- Processing ends immediately. (Default)
- RETAINORIGINAL
- Indicates if Optim should
keep the original Archive File and create a new Archive File with
a unique sequence number appended to the file name and a new GUID/AFID.
If an Archive File has an index file, the index file
is processed after the Archive File is processed successfully. If
the Archive File is overwritten, then the index file is overwritten.
If a new Archive File is created, then the original index file is
retained and a new index file is created.
- YES
- (Default) Optim creates
a new Archive File with a new GUID/AFID and an index file. It registers
the new Archive File. If you specified a collection, the new Archive
File will be added to the collection, as well. The process places
the generated files in the same directory as the original files and
the new file names are derived from the original file names, as follows.
Note: A
number is embedded in the file name to ensure uniqueness in case a
user runs the Compress process more than once for an Archive File.
- New Archive File
- <orig. archive file name>fmf_compress<number>.af
- New Index File
- <orig. index file name>fmf_compress<number>.afx
- NO
- Optim creates
a temporary Archive File and, at the end of the process, deletes the
original Archive File and changes the temporary Archive File name
to the original file name. The original GUID/AFID is kept and the
Archive File retention information (from the Storage Profile) is updated.
- RUN
- Identifies operation to run. The RUN command
and its value indicate the end of a process block. Any commands following
the RUN command are part of the next process block.
(Required.)
- COMPRESS
- Compresses specified files.
Example
The following command
line compresses the Archive and Extract Files specified in command.txt,
the command file. The process report is written to filemaint.txt.
PR0CMND /FMF
OUTPUT=C:\RTDATA\filemaint.txt
@command.txt
The following illustrates the contents
of a command file used by the Compress process.
//This is the first block.
OPTIMDIR OPTIMDIR1
AF OPTIMSVR1 C:/OPTIM/DATA/PAYROLL%.AF,C:/OPTIM/DATA/GENERAL_LEDGER.AF
DEFTHRESHOLD 45
TABLETHRESHOLD DBMS.OPTUSER.CUSTOMERS 50
TABLETHRESHOLD DBMS.OPTUSER.DETAILS 40
TABLETHRESHOLD DBMS.OPTUSER.ITEMS 45
RUN COMPRESS
//This is the second block. The default threshold is ON, therefore, all tables will be compressed.
OPTIMDIR OPTIMDIR2
AF (LOCAL) %ACCOUNTS_PAYABLE.AF,%ACCOUNTS_RECEIVABLE.AF
RUN COMPRESS
//This is the third block.
XF (LOCAL) PAYABLE.XF,C:/OPTIM/DATA/ACCOUNTS_RECEIVABLE.XF
RUN COMPRESS
//This is the fourth block.
OPTIMDIR OPTIMDIR1
AF OPTIMSVR1 C:/OPTIM/DATA/PAYROLL%.AF,C:/OPTIM/DATA/GENERAL_LEDGER.AF
COLLECTION PAYROLL.COLL1,EMPLOYEE.COLL%
DEFTHRESHOLD 45
AFEXCLUDE ACCOUNTS_PAYABLE.AF,ACCOUNTS_RECEIVABLE.AF
RUN COMPRESS