![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: How do I merge two mail.mai files? The Answer is : Using the MAIL command FILE/ALL for each folder, most commonly. The necessary commands can be invoked from a procedure, with one command per folder. As there is rather more to the MAIL database than the MAIL.MAI file, the OpenVMS Wizard would not tend to directly merge multiple MAIL.MAI files using the DCL command CONVERT or similar. There is, however, one situtation where it is reasonable to manually and directly merge two mail files: when main mail.mai file is offline and inaccessable to incoming MAIL due a recovery from BACKUP or perhaps from a CONVERT. If new mail arrives during a time when the MAIL.MAI file is not present, a new MAIL.MAI file will be created. To MERGE the new and the existing file, use the following: $ RENAME/LOG restored_or_convert_mail.MAI MAIL.MAI !Latest version $ RENAME/LOG MAIL.MAI;-1 temporary.MAI !Prior version $ CONVERT/MERGE/STAT/EXCEPT=problem.MAI temporary.MAI MAIL.MAI You can perfrom this in-place MERGE because here the corresponding user record in the VMSMAIL_PROFILE database matches, and thus the directory for the external extentions files holding the larger MAIL messages (MAIL$xxxxxxx.MAI) match. After the MERGE, the temporary file must be deleted or carefully relocated, such that no mail operation -- not even a read -- is performed on this file, lest the profile or the external extension files become unsynchronized. If you do move a MAIL.MAI from one directory to an other, be sure to move all corresponding MAIL$xxxxx.MAI extension files. (The MAIL command SET MAIL_DIRECTORY performs this for you, as it moves the MAIL.MAI file and the extension files into the specified subdirectory.) The possibiolity of duplicate file names on the extension files is the reason why the FILE/ALL command is recommended. If you do decide to risk your MAIL data -- after having made a known good BACKUP -- then you can usually MERGE the larger mail file using: $ CONVERT/FAST/SORT/STAT/EXCP=problem.MAI - left.MAI, right.MAI, middle.MAI new.MAI/FDL=big.fdl The File Definition Language (FDL) file BIG.FDL would be a pre-optimized FDL file. This file would be created using the ANALYZE/RMS command, and the EDIT/FDL command for tuning and customization, and would anticipate the requirements of the larger, aggregate MAIL.MAI file to be produced by the MERGE.
|