Skip to main content  
  Easy400   |       IBM System i home   |   RSS feed
Public Source
Multiple libraries
Main utilities
5250 utility
Windows utility
Service program
Sample code
CGI support


How to handle multiple MMAIL libraries

A rather common requirement of MMAIL users is

  1. To be able to maintain on the same box (partition) at least two versions of library MMAIL:
    • one - related to a fully tested previous MMAIL release- for running production
    • and another - related to a more recent MMAIL release - to be tested
  2. To be able to easily replace the production MMAIL version with its more recent release, once the test has been completed.

To support this scenario, the MMAIL program references to the procedures of its service programs (MMGPSRVPGM, SENDMAIL, SOCKETMAIL, SOCKUTILR4, EXTSRVPGM and WSENDMAIL) must be implemented through library list instead of library name MMAIL.

This was made available in all MMAIL releases dated at least March 7, 2016.
Therefore, the above MMAIL scenario is available if you have such a MMAIL release.

1. How to duplicate the MMAIL library

Renaming library MMAIL is not a proper solution, because also some objects inside the library must be changed.
The following explains what has to be done to create a working duplicate of library MMAIL.

  1. Make sure that you have a MMAIL library released after March 7, 2016 (use command MMAIL/RELEASED to display its release date)
  2. To duplicate library MMAIL use command DUPMMAIL:
                      Duplicate library MMAIL (DUPMMAIL)
     Type choices, press Enter.
     Name of the duplicated library   TOLIB    mmailtest         Name        
     Re-create programs . . . . . . . COMPILE  *NO           *YES, *NO
    Figure 2 - Command DUPMMAIL
    • Name of the duplicated library (TOLIB) - Name to be assigned to the duplicated library.
      No such library must already exist.
    • Re-create programs (COMPILE) - COMPILE - If you want to be able to run command STRDBG for the programs in the duplicated library, programs and service programs must be re-compiled from the sources in this library.
      • *YES, to re-compile programs and service programs.
      • *NO, to keep them as they were compiled in library MMAIL.

Note 1 - Multiple MMAIL libraries on the same box (partition) share:

  • Library MMAILDATA (local customization data)
  • IFS directory /AMAILER .

Note 2 - To unistall a MMAIL library, use command MMAIL/UNINSTALL.
Example:MMAIL/UNINSTALL LIB(mailtest) .

2. Possible scenario of multiple MMAIL libraries

  • Scenario
    • You are already using library MMAIL in production.
    • You want to install on the same box (partition) a new MMAIL version in order to test it while production on the old MMAIL library goes on.
    • If the test result are satisfactory, you want to use the new MMAIL library for production.
  • Do the following
    1. Wait until production is not running, then rename library MMAIL as MMAILOLD.
    2. Install the new library MMAIL and compile its sources via command STRREXPRC SRCMBR(INSTALL) SRCFILE(MMAIL/QREXSRC) .
    3. Duplicate the new library MMAIL to library MMAILTEST via commands
    4. Rename library MMAIL as MMAILNEW .
    5. Rename library MMAILOLD as MMAIL .
    6. Now you can resume production and start tests on library MMAILTEST.
    7. If the test are successful and you like to use the new MMAIL in production
      1. Wait until production is not running, then rename library MMAIL as MMAILOLD.
      2. Rename library MMAILNEW as MMAIL.
      3. Resume production.
      4. It is up to you to decide what to do with libraries MMAILOLD and MMAILTEST.