The MAIL-FILE command or the MAILFIL macro enables you to send BS2000 files (including SYSLST and SYSOUT) to the specified user ID. This email is sent to one or all recipient addresses which are entered in the user ID’s user entry. The email address must be entered in the user ID, see "Entering email addresses for a user ID".
The mail service of the software product interNet Services must be installed because the email is actually sent with the mail sender (SEND-MAIL interface) of interNet Services.
The character set (file attribute CCS-NAME) is taken into account for the text file which is to be transferred, and when it is transferred, conversion takes place to a character set of the open systems environment. You can add a “subject” to the email and specify whether the file should be deleted after it has been transferred successfully.
You can also send the following files using this email concept:
MAIL-FILE for system files SYSLST and SYSOUT, see "Output of SYSLST and SYSOUT using MAIL-FILE".
HSMS reports with HSMS, see the “HSMS” manual [24].
Output files of MAREN, see the “MAREN” manual [31].
When an email address has been selected successfully via the job name, this email address is used as the sender of the email, otherwise the first email address of the execution ID is used. The first email address of the TSOS ID is also provided in case of delivery errors. This ensures that the administrator receives a so-called “bounce mail” when recipient addresses are incorrect and can then correct the email addresses concerned in the user management.
Entering email addresses for a user ID
Email addresses are entered in the user entry of a BS2000 user ID with the EMAIL-ADDRESS operand of the ADD-USER and MODIFY-USER-ATTRIBUTES commands. The MAIL-ADDRESS attribute remains unchanged.
For the TSOS user ID an email address must be entered.
The email addresses which are entered are output using the SHOW-USER-ATTRIBUTES command or the SRMUINF macro.
After new email addresses have been entered, systems support should check these by sending a test mail to the associated user ID.
Output of SYSLST and SYSOUT using MAIL-FILE
MAIL-FILE can output the current system files SYSLST and SYSOUT. For the system output, the value MAIL can be specified instead of PRINT in the relevant output operands in the EXIT-JOB, CANCEL-JOB and ENTER-PROCEDURE commands. Furthermore, for these commands and for the LOGOFF command the default value for system output can be set to PRINT or MAIL in the system parameter SSMOUT.
If no email can be sent when the job terminates, system files which in accordance with the settings would have to be sent in an email are output instead to SPOOL as was previously the case.
Error analysis in the mail service of the software product interNet Services
The system administrator can specify settings for logging and tracing emails by means of the configuration file for the mail sender backend (file SYSDAT.MAIL.<version>.SERVICE.OPT
) and by means of the MODIFY-MAIL-SERVICE-PARAMETER command. The logging and trace files contain detailed information on sending emails, in particular in the event of errors.