PMDF User's Guide
OpenVMS Edition


Previous Next Contents Index


COMPRESS

Compress a mail file.

Syntax

COMPRESS [in-file-spec]

Qualifiers Defaults
/OUTPUT=out-file-spec /OUTPUT=in-file-spec
/PURGE /NOPURGE

Parameters

in-file-spec

Optional parameter specifying the name of the mail file to be compressed.

Description

The COMPRESS command compresses a mail file, making it smaller so that it uses less disk space. Compressing a mail file also provides faster access to folders and messages contained in the file.

If the optional in-file-spec parameter is not supplied, then the mail file which is currently open will be compressed. If no mail file is open, then your default mail file will be compressed.

When compressing your file, four steps are taken:

  1. A temporary file name MAIL_nnnn_COMPRESS.TMP is chosen; nnnn is a unique, four-digit number selected by callable MAIL.
  2. The contents of the file to be compressed are copied to the temporary file and compressed. If /PURGE was specified, then the wastebasket folder of the temporary file is purged and deleted message space reclaimed.
  3. The original, uncompressed mail file is renamed to have the extension .OLD.
  4. The new, compressed file is renamed from MAIL_nnnn_COMPRESS.TMP to either the name of the original input file if /OUTPUT was not specified, or to out-file-spec otherwise.
After the compression is completed, you probably will want to delete the original, uncompressed file.

Qualifiers

/OUTPUT=out-file-spec

Specify an alternate name to use for the compressed mail file. If not specified then the compressed file will have the same name as the input file.

/PURGE

/NOPURGE (default)

By default, the wastebasket folder of the compressed mail file is not purged. Use the /PURGE qualifier to purge the wastebasket and reclaim the deleted space.

Examples

In the following example, the currently open mail file is compressed and purged. In the process of compressing the file, informational messages are output.


EMAIL> COMPRESS/PURGE
%EMAIL-S-CREATED, D1:[BOB]MAIL_2862_COMPRESS.TMP;1 created 
%EMAIL-S-COPIED, D1:[BOB]MAIL.MAI;1 copied to 
  D1:[BOB]MAIL_2862_COMPRESS.TMP;1 (31 records) 
%EMAIL-S-RENAMED, D1:[BOB]MAIL.MAI;1 renamed to D1:[BOB]MAIL.OLD;2 
%EMAIL-S-RENAMED, D1:[BOB]MAIL_2862_COMPRESS.TMP;1 renamed to 
  D1:[BOB]MAIL.MAI;1 
EMAIL> 


Previous Next Contents Index