
Subprogram NWTOSMTP: NWR SMTP CICS Mail Facility
If you have any questions about the content of this page, please contact CICS Requests for clarification
This program is a COMMAREA-driven general-purpose lightweight email producer. It takes the information in the COMMAREA and produces a batch job that invokes SMTP to process the email.
Limitations
Please remember what the “S” in SMTP stands for: Simple. This facility is not an industrial strength mail system. SMTP mail on z/OS can easily be overwhelmed. If you have the need to send thousands of mail messages, please contact NWRDC early in the design stages so we can pursue the acquisition of a facility adequate to your needs.
This process results in a batch job being submitted. That job will either run under the logon-id contained in NWTOSMTP-UID or allowed to default to the logon-id associated with the CICS task. In either case, the logon-id used must be specifically registered with SMTP. Contact NWRDC customer support for help in this matter.
Add the COPY NWSMTPCA statement (note that it contains a “01” level structure) to your CICS program to retrieve the following:
77 NWTOSMTP-ARRAY-MAX PIC S9(9) COMP VALUE 200.
01 NWTOSMTP-COMMAREA.
05 NWTOSMTP-TAG PIC X(24) VALUE 'NWTOSMTP V001 COMMAREA'.
05 NWTOSMTP-TO-ADDRESS PIC X(76).
05 NWTOSMTP-SUBJECT PIC X(60).
05 NWTOSMTP-UID PIC X(08).
05 NWTOSMTP-PWD PIC X(08).
05 NWTOSMTP-LINES PIC S9(9) COMP.
05 NWTOSMTP-ARRAY PIC X(80) OCCURS 200.
05 NWTOSMTP-ETAG PIC X(24) VALUE 'NWTOSMTP COMMAREA END'.
All items except NWTOSMTP-UID AND NWTOSMTP-PWD are required. If these two fields are omitted, the subsequent job will run under the logon-ID of the terminal operator. If they are filled out (both must be, if either one is specified) they will used to construct the batch job.
You move the mail text to NWTOSMTP-ARRAY and set the number of lines in NWTOSMTP-LINES. Note: Maximum lines is 200.
Example
MOVE ‘STEVE_MENARD@nwrdc.fsu.edu’ TO NWTOSMTP-TO-ADDRESS.
MOVE ‘YOU HAVE MAIL’ TO NWTOSMTP-SUBJECT.
MOVE +3 TO NWTOSMTP-LINES.
MOVE ‘Bong’ TO NWTOSMTP-ARRAY(1).
MOVE ‘Bong’ TO NWTOSMTP-ARRAY(2).
MOVE ‘Bong’ TO NWTOSMTP-ARRAY(3).
EXEC CICS LINK
PROGRAM(‘NWTOSMTP’)
COMMAREA(NWTOSMTP-COMMAREA)
RESP(RESP)
END-EXEC.