You can also transmit important information of the DBH session automatically by email.
To do this, in the MAIL parameter file you enter the recipient, sender and relevant message numbers for the email outputs of the DBH.
You define the type and scope of the DBH email output using DBH options and administration statements.
Prerequisites for email output of the DBH
The mail service of the software product interNet Services must be available.
The email is actually sent by the DBH with the mail transmitter (SEND-MAIL interface) of the software product interNet Services.
MAIL parameter file
The MAIL parameter file is a BS2000 file which the user creates and assigns to the DBH via the link name SESMAIL at startup, see "Requirements for starting".
If you assign the MAIL parameter file to a DBH before it is started, the parameters set there become effective when the DBH is started. Otherwise you can (initially) not use the email output of the DBH.
The MAIL parameter file can be modified while the DBH session is active. However, the (modified) parameters become effective only when the administration statement MODIFY-MAIL-PARAMETERS (see "MODIFY-MAIL-PARAMETERS") is entered. The administration statement SHOW-MAIL-PARAMETERS (see "SHOW-MAIL-PARAMETERS") enables you to display the current MAIL parameters.
Structure of the MAIL parameter file
The MAIL parameter file must be a SAM file and can, for example, be created using the file editor EDT (see the “ EDT (BS2000)” manual).
The specifications in the parameter file must satisfy the following rules:
Each line contains precisely one parameter specification.
Lines beginning with # are ignored (comment lines).
All other lines must begin with the keyword “ADDRESS=”, “SENDER=” or “MSG=”. Blanks make no sense in these lines: they terminate analysis of the input.
The
ADDRESS=<email-address>
line is used to specify the email address to which the emails of the DBH are sent. You can also specify more than one email address, each separated by a semicolon. The<email-address>
can also be enclosed in single quotes. SESAM/SQL does not check the validity of an email address. Nor does SESAM/SQL check whether the email transmission was successful. Answers to the email go to the email address entered under “SENDER=”.
If the “ADDRESS=” line is specified more than once, only the last “ADDRESS=” line specified is used.The
SENDER=<email-address>
line is used to specify an email address which is entered as the sender of the email. The<email-address>
can also be enclosed in single quotes. SESAM/SQL does not check the validity of an email address. If no sender address is specified, the email has no sender.Specifying an unsuitable sender can lead to problems with the recipient’s mail server or to unwanted processing by SPAM filters.The
MSG=<msg-no>
lines are used to specify message numbers whose occurrence is to result in an email notification being sent (depending on the IMMEDIATE=*YES/*NO option).When message numbers are specified, right-justified wildcard characters
*
(any character) may be used to form message groups (e.g. all bottleneck messages can be entered withMSG=SES60**
).Each message number or message group must be specified in a separate line. Up to 100 lines with message numbers or message groups can be specified. A message number can be specified multiple times, also within message groups with wildcards. However, when it occurs the message is only sent once.
Example of a MAIL parameter file
############################################### # MAIL parameter file for the SESAM/SQL DBH ############################################### ADDRESS=NAME1@COMPANY.COM SENDER=NAME2@COMPANY.COM # Display start message MSG=SES0060 # Display of bottleneck messages MSG=SES60**
Options and statements for controlling email output of the DBH
With the MODIFY-OUTPUT-MODE statement (see "MODIFY-OUTPUT-MODE") you can define additional output by email as the output destination for all the following administration statements.
You set the scope of the DBH’s email outputs with the DBH options MSG-OUTPUT (see "MSG-OUTPUT") and SERVICE-TASKS (see "SERVICE-TASKS"). The administration statements MODIFY-MSG-OUTPUT (see "MODIFY-MSG-OUTPUT") and MODIFY-SERVICE-TASKS (see "MODIFY-SERVICE-TASKS") allow you to modify the scope of the DBH’s email outputs.