Sending Email on MVS via SMTP
Sending Email on MVS via SMTP
-Or-
-Or-
Youve Got Mail!
Youve Got Mail!
(from the mainframe)
(from the mainframe)
-or-
-or-
Sleeple in SMTP
Sleeple in SMTP
!on Gi""en
!on Gi""en
#on$provita%&om
#on$provita%&om
' (amiliar Phone )onveration*
' (amiliar Phone )onveration*
+
+
,ello- thi i !on%%.
,ello- thi i !on%%.
/
+
+
Ye- thi i Steve 0ig1ig here- did m2 e3tra&t run
Ye- thi i Steve 0ig1ig here- did m2 e3tra&t run
lat night**.
lat night**.
+
+
4et me &he&5% 6&li&5 &li&57 Ye- the2 are
4et me &he&5% 6&li&5 &li&57 Ye- the2 are
done%%the #o" ran lat night at 8am.
done%%the #o" ran lat night at 8am.
/
+
+
O5- and &ould 2ou tell me ho1 man2 re&ord 1ere
O5- and &ould 2ou tell me ho1 man2 re&ord 1ere
on it*.
on it*.
6&li&5 &li&57 + Yeah- 9::%.
6&li&5 &li&57 + Yeah- 9::%.
/
+
+
Than5.
Than5.
;e3t 1ee5%%ame e3a&t phone &all!!!
;e3t 1ee5%%ame e3a&t phone &all!!!
<ntrodu&tion
<ntrodu&tion
;eed to notif2 uer 1hen &ertain
;eed to notif2 uer 1hen &ertain
&ondition have "een met- u&h a%%%
&ondition have "een met- u&h a%%%
/
=eport Printed>=ead2
=eport Printed>=ead2
/
(ile tranferred
(ile tranferred
/
!o" &ompleted>failed
!o" &ompleted>failed
Provide ome 5ind of automated reporting -
Provide ome 5ind of automated reporting -
ie%%end data to omeone on a regular "ai
ie%%end data to omeone on a regular "ai
,o1 a"out uing Email*
,o1 a"out uing Email*
Email &an help "ridge the &ommuni&ation
Email &an help "ridge the &ommuni&ation
gap "et1een 2ou (the developer) and end
gap "et1een 2ou (the developer) and end
uer%
uer%
The ret of the 1orld ue email to notif2
The ret of the 1orld ue email to notif2
people a"out thing- 1h2 not 2ou and 2our
people a"out thing- 1h2 not 2ou and 2our
MVS-"aed (O)?S program*
MVS-"aed (O)?S program*
Preentation 'genda
Preentation 'genda
,o1 doe it 1or5*
,o1 doe it 1or5*
/
;ote )ontrol (ile
;ote )ontrol (ile
Sample !)4 (<nline @ Pro&edure)
Sample !)4 (<nline @ Pro&edure)
Sample (O)EAE) &ode
Sample (O)EAE) &ode
Sending a report via email
Sending a report via email
'dvan&ed ?age (?=4- ,TM4)
'dvan&ed ?age (?=4- ,TM4)
BBB reour&e
BBB reour&e
C @ '
C @ '
,o1 doe it 1or5*
,o1 doe it 1or5*
<n a nuthellD
<n a nuthellD
/
E - F2nami&all2 &reate 2our ;OTE )O;T=O4 (<4E or
E - F2nami&all2 &reate 2our ;OTE )O;T=O4 (<4E or
ue one that 2ou have alread2 &reated%
ue one that 2ou have alread2 &reated%
/
G - ;OTE )O;T=O4 file &ontain the +e&ret
G - ;OTE )O;T=O4 file &ontain the +e&ret
handha5e. a 1ell a 2our note "od2 te3t%
handha5e. a 1ell a 2our note "od2 te3t%
/
8 - Send ;OTE )O;T=O4 file off to SMTP via <E0GE;E=%
8 - Send ;OTE )O;T=O4 file off to SMTP via <E0GE;E=%
SMTP allo1 for ending of email to an2
SMTP allo1 for ending of email to an2
&onne&ted <ntranet or <nternet hot%
&onne&ted <ntranet or <nternet hot%
;ote )ontrol (ile - =EC?<=EF E4EME;TS
;ote )ontrol (ile - =EC?<=EF E4EME;TS
(or%%%%Bhat the e&ret handha5e*)
(or%%%%Bhat the e&ret handha5e*)
E% ,E4O ,OST - ,OST i name of the MVS,OST (defined
E% ,E4O ,OST - ,OST i name of the MVS,OST (defined
in SYSE%P'=M4<0(<E(SS;33)
in SYSE%P'=M4<0(<E(SS;33)
G% M'<4 (=OMD6email addre7 -ender of note
G% M'<4 (=OMD6email addre7 -ender of note
8% =)PT TOD6email addre7 - E line per email
8% =)PT TOD6email addre7 - E line per email
re&ipient (a man2 re&ipient a 2ou 1ant)
re&ipient (a man2 re&ipient a 2ou 1ant)
H% F'T' - eperator "et1een =)PT TO @ S?0!E)T
H% F'T' - eperator "et1een =)PT TO @ S?0!E)T
9% S?0!E)T - u"#e&t line of note
9% S?0!E)T - u"#e&t line of note
I% ;ote 0od2
I% ;ote 0od2
Sample ;ote )ontrol file
Sample ;ote )ontrol file
Note Control file generated with FOCUS/Dialogue Manager
(using -WRI! state"ents#
HELO HOST
MAIL FROM:<JON@[Link]>
RCPT TO:<[Link]@[Link]>
DATA
SUBJECT: TEST OF MAILING OUT
THIS IS A TEST OF EMAIL :)
JON GIBBENS
!)4 e&tion of a pro&edure
!)4 e&tion of a pro&edure
I!$%!N!R - &o'ies se(uential dataset fro" an) de*i&e to an) de*i&e+
In'ut ste' in S,SU- - lo&ation of Note Control File
Out'ut ste' in S,SU. - 'asses &ontrol to SM/ 'rogra"
//**********************************************************************
//* PS00: E!ECUTE IEBGENER PROGRAM TO SEND EMAIL NOTIFICATION VIA SMTP
//**********************************************************************
//PS00 E!EC PGM"IEBGENER
//**********************************************************************
//S#SIN DD DUMM#
//S#SUT$ DD DSN"%W&PDS..[Link]'DISP"SHR
//S#SUT DD S#SOUT"(B'SMTP)
//S#SOUT DD S#SOUT"!
//S#SPRINT DD S#SOUT"!
!)4 1ith note &ontrol file
!)4 1ith note &ontrol file
in&luded inline
in&luded inline
//MA)JOGA$ JOB (TEST'MF)$)'*JON MAIL TEST*'CLASS"+'MSGCLASS"T'
// NOTIF#"MF)JOG'USER"MF)JOG
//IEBGENER E!EC PGM"IEBGENER
//S#SIN DD DUMM#
//S#SUT$ DD *
HELO HOST
MAIL FROM:<JON@[Link]>
RCPT TO:<[Link]@[Link]>
DATA
SUBJECT: TEST OF MAILING OUT
THIS IS A TEST OF EMAIL :)
JON GIBBENS
/*
//S#SUT DD S#SOUT"(B'SMTP)
//S#SOUT DD S#SOUT"!
//S#SPRINT DD S#SOUT"!
Sample ;ote generated "2 !)4
Sample ;ote generated "2 !)4
( a vie1ed in E3&hange)
( a vie1ed in E3&hange)
Sample S&enario
Sample S&enario
Bant to let Steve 0ig1ig 5no1 1hen hi #o"
Bant to let Steve 0ig1ig 5no1 1hen hi #o"
ran- and ho1 man2 re&ord it pulled%
ran- and ho1 man2 re&ord it pulled%
Sample (o&e3e& to follo1 1rite out the J
Sample (o&e3e& to follo1 1rite out the J
2tem time @ date- and the J of re&ord in
2tem time @ date- and the J of re&ord in
a flat file% 'lo &reate our ;OTE )O;T=O4
a flat file% 'lo &reate our ;OTE )O;T=O4
(<4E%
(<4E%
(O)?S &ode to &reate ;OTE
(O)?S &ode to &reate ;OTE
)ontrol (ile
)ontrol (ile
(o&e3e& i EM4S'MPE
(o&e3e& i EM4S'MPE
/
<n&lude a utilit2 < ue for &reating mot of m2
<n&lude a utilit2 < ue for &reating mot of m2
email related @@ varia"le
email related @@ varia"le
Thi &ode 1ould go '(TE= Kdata e3tra&t
Thi &ode 1ould go '(TE= Kdata e3tra&t
portion of the program%
portion of the program%
Bould "e part of a !)4 #o">pro&edure
Bould "e part of a !)4 #o">pro&edure
,*
TABLE FILE <-./01213>
SUM [Link]
B# CODE
,*
,*EMLSAMP$: JONATHAN GIBBENS
,*FOCE!EC ABOVE DOES E!TRACT FOR STEVE BIGWIG
,*
END
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* SET THE S#STEM TIME VARIABLE
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,SET %STIME " * *4
,SET %STIME " HHMMSS(%STIME)4
,*
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* SET UP 5 BOD# LINES FOR EMAIL MESSAGE ,
,* DATE/TIME/RECORDS/LINES
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,SET %NEATDATE " EDIT(%##MD'*++++/++/++*)4
,SET %BOD#$ " * #OUR E!TRACT RAN ON * 6 %NEATDATE 6 * AT * 6
, %STIME4
,SET %BOD# " * THE NUMBER OF LINES IN #OUR E!TRACT WAS * 6
, %LINES4
,SET %BOD#5 " * THE NUMBER OF RECORDS IN #OUR E!TRACT WAS *6
%RECORDS4
,*
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* SET UP THE RECIPIENTS OF THE NOTE' AND THE SUBJECT
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,SET %RCPT$"*[Link]@[Link]*4
,SET %RCPT"*STEVEB@COMPAN#.COM*4
,SET %SUBJECT " *FILE E!TRACTS FOR * 6 %NEATDATE4
,*
,*
,***********************************************************
,* NOTE CONTROL FILE UTILIT#
,* JON GIBBENS , PROVISTA SOFTWARE INTL. , JON@[Link]
,*
,* SET UP %% VARIABLES FOR CREATION OF NOTE CONTROL FILE
,* NOTE: ALL OF THESE ,SETS COULD BE INSIDE OF AN INCLUDE
,* FILE FOR CONVENIENCE AND CODE PORTABILIT#
,**
,** INPUTS:
,** %RCPT$,7 " UP TO FIVE VALID EMAIL ADDRESSES
,** %SUBJECT " THE SUBJECT OF THE NOTE
,**
,** OUTPUTS: ESSENTIAL VARIABLES FOR AN EMAIL MESSAGE
,**
,** %HELOLINE " *HELO HOST* , FIRST LINE OF EMAIL MESSAGE
,** WHERE HOST IS THE MAIL SUBS#STEM
,** %RCPTLNE$"*RCPT TO:<RPCT$>* FIRST RECIPIENT
,** %RCPTLNE"*RCPT TO:<RPCT>* ND RECIPIENT
,** %RCPTLNE5"*RCPT TO:<RPCT5>* 5RD 88
,** %RCPTLNE9"*RCPT TO:<RPCT9>* 9TH 88
,** %RCPTLNE7"*RCPT TO:<RPCT7>* 7TH 88
,** %SUBLINE " *SUBJECT: %SUBJECT*
,** %TOEND " *>* , THE END OF THE *TO* LINE
,** %DATALINE " *DATA* , PUT AFTER *TO* LINE(:)
,** %SUBBEG " *SUBJECT:* , BEGINNING OF SUBJECT LINE
,** %SIGLINE$"*THAN&S; HAVE A NICE DA#;*
,** %BLAN&LINE " * * , SPACES/BLAN&S
,**************************************************************
,**DEFAULT THE ESSENTIAL ELEMENTS,
***************************************************************
,DEFAULTS %HELOLINE " *HELO HOST*
,DEFAULTS %TOBEG " *RCPT TO:<*
,DEFAULTS %TOEND " *>*
,DEFAULTS %DATALINE " *DATA*
,DEFAULTS %SUBBEG " *SUBJECT: *
,DEFAULTS %RCPT$"* *
,DEFAULTS %RCPT"* *
,DEFAULTS %RCPT5"* *
,DEFAULTS %RCPT9"* *
,DEFAULTS %RCPT7"* *
,DEFAULTS %SUBJECT " * *
,DEFAULTS %BLAN&LINE " * *
,RUN
EMLSAMP1 Focexec
,*
,* ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,* SET UP THE RCPT TO: LINES , UP TO 7 PEOPLE CAN BE SENT THE EMAIL
,* READ IN THE %RCPT$'%RCPT'%RCPT5'%RCPT9'%RCPT7 VARIABLES
,* OUTPUT IN THE FORMAT: RCPT TO:<EMAIL ADDRESS>
,* ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,*
,SET %RCPTLNE$ " %TOBEG 66 %RCPT$ 66 %TOEND4
,SET %RCPTLNE " %TOBEG 66 %RCPT 66 %TOEND4
,SET %RCPTLNE5 " %TOBEG 66 %RCPT5 66 %TOEND4
,SET %RCPTLNE9 " %TOBEG 66 %RCPT9 66 %TOEND4
,SET %RCPTLNE7 " %TOBEG 66 %RCPT7 66 %TOEND4
,*
,* ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,* SET UP THE SUBJECT LINE , READ IN %SUBJECT4
,* ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,*
,SET %SUBLINE " *SUBJECT: * 6 %SUBJECT4
,
********************************************************************
,**INSTALLATION SPECIFIC VARIABLES
,** %FROMLINE , EMAIL ADDRESS FOR THE SENDER (CAN BE AN# EMAIL
,** ADDRESS)
,** %SIGLINE$ , LINE TO END THE EMAIL
********************************************************************
,*
,DEFAULTS %FROMLINE " *MAIL FROM:<THEBIGMAINFRAME@COMPAN#.COM>*
,DEFAULTS %SIGLINE$ " *THAN&S; HAVE A NICE DA#;;*
,DEFAULTS %SIGLINE " *<UESTIONS/PROBLEMS= EMAIL
TECHSUPPORT@COMPAN#.COM*
,
********************************************************************
***
,*
,* ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,* WRITE OUT THE NOTE CONTROL FILE: NOTECNTL
,* NOTE CONTROL FILE IS A FLAT FILE ALLOCATED AS MOD
,* FOR SIMPLE NOTES' IT CAN BE FI!ED FORMAT' >0 CHARACTERS' ?+0
BL&S
,
EMLSAMP1 Focexec
,* ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* WRITE OUT THE HELOLINE % THE FROM LINE
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,*
,WRITE NOTECNTL %HELOLINE
,WRITE NOTECNTL %FROMLINE
,*
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* WRITE OUT THE RECIPIENT(S)
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,*
,WRITE NOTECNTL %RCPTLNE$
,WRITE NOTECNTL %RCPTLNE
,*
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* WRITE OUT THE DATA SEPERATOR % SUBJECT LINE
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,*
,WRITE NOTECNTL %DATALINE
,WRITE NOTECNTL %SUBLINE
,*
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,* WRITE OUT THE BOD# OF THE NOTE
,* """""""""""""""""""""""""""""""""""""""""""""""""""""
,*
,WRITE NOTECNTL %BLAN&LINE
,WRITE NOTECNTL %BOD#$
,WRITE NOTECNTL %BOD#
,WRITE NOTECNTL %BOD#5
,WRITE NOTECNTL %BLAN&LINE
,WRITE NOTECNTL %SIGLINE$
,WRITE NOTECNTL %SIGLINE
,*
,*
,* """""""""""""""""""""""""""""""""""""""""""""""""""""""""
,* END OF JOB EMLSAMP$
,* """""""""""""""""""""""""""""""""""""""""""""""""""""""""
=eulting file from EM4S'MP
=eulting file from EM4S'MP
HELO HOST HELO HOST
MAIL FROM:<THEBIGMAINFRAME@COMPAN#.COM> MAIL FROM:<THEBIGMAINFRAME@COMPAN#.COM>
RCPT TO:<[Link]@[Link]> RCPT TO:<[Link]@[Link]>
RCPT TO:<STEVEB@COMPAN#.COM> RCPT TO:<STEVEB@COMPAN#.COM>
DATA DATA
SUBJECT: FILE E!TRACTS FOR $+++/0+/$0 SUBJECT: FILE E!TRACTS FOR $+++/0+/$0
#OUR E!TRACT RAN ON $+++/0+/$0 AT $@.75.99 #OUR E!TRACT RAN ON $+++/0+/$0 AT $@.75.99
THE NUMBER OF LINES IN #OUR E!TRACT WAS ? THE NUMBER OF LINES IN #OUR E!TRACT WAS ?
THE NUMBER OF RECORDS IN #OUR E!TRACT WAS $000 THE NUMBER OF RECORDS IN #OUR E!TRACT WAS $000
THAN&S; HAVE A NICE DA#;; THAN&S; HAVE A NICE DA#;;
<UESTIONS/PROBLEMS= EMAIL TECHSUPPORT@COMPAN#.COM <UESTIONS/PROBLEMS= EMAIL TECHSUPPORT@COMPAN#.COM
Sending a report via email
Sending a report via email
To end a mall report (le than the
To end a mall report (le than the
ma3iumum line length of 2our email &lient)
ma3iumum line length of 2our email &lient)
E% Turn off page-"rea5 (SET P'GEL;OP'GE )
E% Turn off page-"rea5 (SET P'GEL;OP'GE )
G% Put ;OTE )O;T=O4 (<4E element into 2our
G% Put ;OTE )O;T=O4 (<4E element into 2our
,E'FE= (ie%%,E4O-M'<4 (=OM-=)PT TO-F'T')
,E'FE= (ie%%,E4O-M'<4 (=OM-=)PT TO-F'T')
8% Save file in BP format and then end off to
8% Save file in BP format and then end off to
<E0GE;E= uing !)4 in e3ample%
<E0GE;E= uing !)4 in e3ample%
'dvan&ed ?age
'dvan&ed ?age
?=4 - E3&hange>Outloo5 or ;et&ape mail (other
?=4 - E3&hange>Outloo5 or ;et&ape mail (other
mail &lient a 1ell) 1ill read an2 ?=4 2ou
mail &lient a 1ell) 1ill read an2 ?=4 2ou
in&lude in 2our note and 1ill a&tivate them
in&lude in 2our note and 1ill a&tivate them
/
So- if 2ou are doing <ntranet t2pe reporting- 2ou &an
So- if 2ou are doing <ntranet t2pe reporting- 2ou &an
point uer to 1here the report are%
point uer to 1here the report are%
)an do fan&ier ,TM4 formatting if in&lude M<ME
)an do fan&ier ,TM4 formatting if in&lude M<ME
tag and ,TM4 &ode (e3ample to follo1)
tag and ,TM4 &ode (e3ample to follo1)
/
Onl2 reall2 1or5 if email &lient full2 upport ,TM4- or
Onl2 reall2 1or5 if email &lient full2 upport ,TM4- or
at leat- upport the feature that YO? need%
at leat- upport the feature that YO? need%
;ote )ontrol (ile 1ith a ?=4
;ote )ontrol (ile 1ith a ?=4
along 1ith reulting note%
along 1ith reulting note%
HELO HOST HELO HOST
MAIL FROM:<JON@[Link]> MAIL FROM:<JON@[Link]>
RCPT TO:<[Link]@[Link]> RCPT TO:<[Link]@[Link]>
DATA DATA
SUBJECT: TEST OF USING URL IN NOTE SUBJECT: TEST OF USING URL IN NOTE
A ABBC :D01 0B 2D:D0 EB3 FUSE,31F/01C DGEB3H/0DBG A ABBC :D01 0B 2D:D0 EB3 FUSE,31F/01C DGEB3H/0DBG
D:: D::
.00I://---.J:K./L-/3C.1CK/FOCUS/GJ/FEK:1..0H .00I://---.J:K./L-/3C.1CK/FOCUS/GJ/FEK:1..0H
;ote )ontrol (ile 1ith ,TM4
;ote )ontrol (ile 1ith ,TM4
along 1ith reulting note%
along 1ith reulting note%
HELO HOST HELO HOST
MAIL FROM:<THEBIGMAINFRAME@[Link]> MAIL FROM:<THEBIGMAINFRAME@[Link]>
RCPT TO:<[Link]@[Link]> RCPT TO:<[Link]@[Link]>
DATA DATA
SUBJECT: A HTML TEST NOTE SUBJECT: A HTML TEST NOTE
MIME,V13:DBG: $.0 MIME,V13:DBG: $.0
CBG01G0,0LI1: 01M0/.0HF4 J./3:10"NK:,/:JDDO CBG01G0,0LI1: 01M0/.0HF4 J./3:10"NK:,/:JDDO
<HTML> <HTML>
<BOD#> <BOD#>
<H$>H131P: 0.1 QDA .1/C13 BE 0.1 GB01</H$> <H$>H131P: 0.1 QDA .1/C13 BE 0.1 GB01</H$>
<P> <P>
H1L' .131P: /G HTML GB01 0./0 -DFF ./21 LBK :11DGA <EBG0 H1L' .131P: /G HTML GB01 0./0 -DFF ./21 LBK :11DGA <EBG0
E/J1"NA3D/FO :DR1"NS7O JBFB3"31C>RED</EBG0> E/J1"NA3D/FO :DR1"NS7O JBFB3"31C>RED</EBG0>
</BOD#> </BOD#>
</HTML> </HTML>
BBB =eour&e
BBB =eour&e
Fave MVS Mail Page -
Fave MVS Mail Page -
httpD>>uer%ti&net%&om>davea>mv>mvmail
httpD>>uer%ti&net%&om>davea>mv>mvmail
Fe&oding <nternet 'tta&hment -
Fe&oding <nternet 'tta&hment -
httpD>>page%prodig2%net>mi&haelMantove&>de&ode%htm
httpD>>page%prodig2%net>mi&haelMantove&>de&ode%htm
- To find out more a"out M<ME tag- and different
- To find out more a"out M<ME tag- and different
&ompati"ilit2 iue 1ith different email &lient
&ompati"ilit2 iue 1ith different email &lient
Cuetion*
Cuetion*
Fo1nload thi preentation
Fo1nload thi preentation
;orthern )alifornia (?SE ,omepageD
;orthern )alifornia (?SE ,omepageD
.00I://---.J:K./L-/3C.1CK/FOCUS/H2:H/DF.II0 .00I://---.J:K./L-/3C.1CK/FOCUS/H2:H/DF.II0