Trigerring an email via db2/os390 v6

Pierre Dagenais

Trigerring an email via db2/os390 v6
Hi everyone,

I would like to facilitate and automate sending an email for all our
db2/os390 applications through the use of a trigger.
The concept is simple .

I will create a table called EMAIL ( FROM char(200), TO char(200), BODY
varchar(32000)).
I will create a trigger on insert into this table that will execute a
stored procedure called SEND_EMAIL.

So when an application needs to send an email, all the programmers
needs to do is
insert a row into the table EMAIL.

The concept is simple but I don't how which email program(s)
on os390 my stored procedure SEND_EMAIL should call?
Do you know?

As anyone done this using db2 os390 v6?
What are the limitations or drawbacks of this concept?
I need a solution that will work for mainframe or powerbuilder
applications. So I have to consider ascii and ebcdic email.
I will appreciate any insights or help you can give me.

Thanks

We are at db2 v6.1 , os390 2.8

Pierre Dagenais



Philip Nelson

Re: Trigerring an email via db2/os390 v6
(in response to Pierre Dagenais)
I assume you've seen the article in the recent DB2 Magazine (www.db2mag.com) on doing this from DB2 UDB on Unix ?

On that platform you'd call Sendmail natively - but the article actually uses a Java interface to this.

I'm not sure OS/390 has a "standard" MTA (mail transport agent) similar to Sendmail (although you never know !!!).

HTH

Phil

On Mon, 8 Jan 2001 11:49:59 -0500, Pierre Dagenais wrote:

>Hi everyone,
>
>I would like to facilitate and automate sending an email for all our
>db2/os390 applications through the use of a trigger.
>The concept is simple .
>
>I will create a table called EMAIL ( FROM char(200), TO char(200), BODY
>varchar(32000)).
>I will create a trigger on insert into this table that will execute a
>stored procedure called SEND_EMAIL.
>
>So when an application needs to send an email, all the programmers
>needs to do is
>insert a row into the table EMAIL.
>
>The concept is simple but I don't how which email program(s)
>on os390 my stored procedure SEND_EMAIL should call?
>Do you know?
>
>As anyone done this using db2 os390 v6?
>What are the limitations or drawbacks of this concept?
>I need a solution that will work for mainframe or powerbuilder
>applications. So I have to consider ascii and ebcdic email.
>I will appreciate any insights or help you can give me.
>
>Thanks
>
>We are at db2 v6.1 , os390 2.8
>
>Pierre Dagenais
>
>
>



James Campbell

Re: Trigerring an email via db2/os390 v6
(in response to Philip Nelson)
Pierre

OS/390 includes an SMTP program - see the IP Customization and Admin manual
(eg SC31-8513 in the eNetwork Comms bookshelf for OS/390 V2.7; I don't know
the V2.8 manual number). You can hook up to it by having a DD pointing to
writer name SMTP (usually) and writing headers and data in RFC822 format.

A discussion of the data formats can be found in the IP Users Guide in the
SMTPNOTE section. All data will need to be in EBCDIC - SMTP will convert it
to ASCII. If the table is set up with CCSID EBCDIC, DB2 should convert any
inserted data to EBCDIC.

/* standard disclaimer */
James Campbell
DBA
Hansen Corporation, Doncaster
+61 3 9843 8442
[login to unmask email]
-----Original Message-----
From: Pierre Dagenais [mailto:[login to unmask email]
Sent: Tuesday, January 09, 2001 3:50 AM
To: [login to unmask email]
Subject: [DB2-L] Trigerring an email via db2/os390 v6


Hi everyone,

I would like to facilitate and automate sending an email for all our
db2/os390 applications through the use of a trigger.
The concept is simple .

I will create a table called EMAIL ( FROM char(200), TO char(200), BODY
varchar(32000)).
I will create a trigger on insert into this table that will execute a
stored procedure called SEND_EMAIL.

So when an application needs to send an email, all the programmers
needs to do is
insert a row into the table EMAIL.

The concept is simple but I don't how which email program(s)
on os390 my stored procedure SEND_EMAIL should call?
Do you know?

As anyone done this using db2 os390 v6?
What are the limitations or drawbacks of this concept?
I need a solution that will work for mainframe or powerbuilder
applications. So I have to consider ascii and ebcdic email.
I will appreciate any insights or help you can give me.

Thanks

We are at db2 v6.1 , os390 2.8

Pierre Dagenais







**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



[login to unmask email]

Re: Trigerring an email via db2/os390 v6
(in response to James Campbell)
Pierre,

This is some JCL I used to send an Email with a file (TXT1) as an
attachment, thought it may help. The SYSEXEC is the library which holds the
XMITIP REXX program at your site.

Jim.

//CTS03E2A JOB (1234),'JOB',CLASS=G,MSGCLASS=X,NOTIFY=&SYSUID
//*
//SENDMAIL EXEC PGM=IKJEFT01,DYNAMNBR=35
//SYSEXEC DD DSN=RS.PROD.RLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//TXT1 DD DSN=CTS.DBA.JCL(EMAIL),DISP=SHR
//SYSTSIN DD *
%XMITIP ([login to unmask email]) -
FILEDD (TXT1) -
FILENAME (TEST.TXT) -
FORMAT (.TXT) -
NOMSG -
SUBJECT "TEST TEXT FROM BATCH"
//*

-----Original Message-----
From: Pierre Dagenais [mailto:[login to unmask email]
Sent: 08 January 2001 16:50
To: [login to unmask email]
Subject: Trigerring an email via db2/os390 v6


Hi everyone,

I would like to facilitate and automate sending an email for all our
db2/os390 applications through the use of a trigger.
The concept is simple .

I will create a table called EMAIL ( FROM char(200), TO char(200), BODY
varchar(32000)).
I will create a trigger on insert into this table that will execute a
stored procedure called SEND_EMAIL.

So when an application needs to send an email, all the programmers
needs to do is
insert a row into the table EMAIL.

The concept is simple but I don't how which email program(s)
on os390 my stored procedure SEND_EMAIL should call?
Do you know?

As anyone done this using db2 os390 v6?
What are the limitations or drawbacks of this concept?
I need a solution that will work for mainframe or powerbuilder
applications. So I have to consider ascii and ebcdic email.
I will appreciate any insights or help you can give me.

Thanks

We are at db2 v6.1 , os390 2.8

Pierre Dagenais







***************************************************************
The contents of this Email and any files transmitted with it
are confidential and intended solely for the use of the
individual or entity to whom it is addressed. The views stated
herein do not necessarily represent the view of the company.
If you are not the intended recipient of this Email you may not
copy, forward, disclose or otherwise use it or any part of it
in any form whatsoever. If you have received this mail in
error please Email the sender.
***************************************************************



Michael Ebert

Re: Trigerring an email via db2/os390 v6
(in response to Jim.Leask@RS-COMPONENTS.COM)
Jim,

is this a standard OS/390 REXX? If so, how can I locate it in our system? I
could not find it, a reference to it, or anybody who knows it anywhere.
For info, I have attached the job I use for sending SMTP emails from OS/390.

Dr. Michael Ebert
DB2 Database Administrator
aMaDEUS Data Processing
Erding / Munich, Germany

//OSO031MA JOB (USERJOB,ME),'M.EBERT X3962',CLASS=Y,MSGCLASS=D,
// MSGLEVEL=(1,1),REGION=0M,NOTIFY=&SYSUID
//*---------------------------------------------------------------------
//* Send mail with SMTP
//*---------------------------------------------------------------------
//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD DUMMY,SYSOUT=*
//SYSUT2 DD SYSOUT=A,DEST=SMTP,DCB=(LRECL=80,RECFM=F)
//SYSUT1 DD *
HELO MUCMVSB
MAIL FROM:<[login to unmask email]>
RCPT TO:<[login to unmask email]>
DATA
From: MVS batch job 'OSO031MA'
Subject: This is a test

If you can read this... great!

Regards, MVS batch job 'OSO031MA'
/*

From: [login to unmask email] on 09/01/2001 09:55 GMT
|--------->
| |
|--------->
>--------------------------------------------------------------------------->
| |
>--------------------------------------------------------------------------->
>-------------------------------------------|
| |
>-------------------------------------------|
|--------->
|To: |
|--------->
>--------------------------------------------------------------------------->
|[login to unmask email] |
>--------------------------------------------------------------------------->
>-------------------------------------------|
| |
| |
>-------------------------------------------|
|--------->
|cc: |
|--------->
>--------------------------------------------------------------------------->
| (bcc: Michael Ebert/MUC/AMADEUS) |
>--------------------------------------------------------------------------->
>-------------------------------------------|
| |
| |
>-------------------------------------------|
|--------->
| |
|--------->
>--------------------------------------------------------------------------->
| |
>--------------------------------------------------------------------------->
>-------------------------------------------|
| |
>-------------------------------------------|
|--------->
|Subject: |
|--------->
>--------------------------------------------------------------------------->
|Re: Trigerring an email via db2/os390 v6 |
>--------------------------------------------------------------------------->
>-------------------------------------------|
| |
>-------------------------------------------|



Pierre,

This is some JCL I used to send an Email with a file (TXT1) as an
attachment, thought it may help. The SYSEXEC is the library which holds the
XMITIP REXX program at your site.

Jim.

//CTS03E2A JOB (1234),'JOB',CLASS=G,MSGCLASS=X,NOTIFY=&SYSUID
//*
//SENDMAIL EXEC PGM=IKJEFT01,DYNAMNBR=35
//SYSEXEC DD DSN=RS.PROD.RLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//TXT1 DD DSN=CTS.DBA.JCL(EMAIL),DISP=SHR
//SYSTSIN DD *
%XMITIP ([login to unmask email]) -
FILEDD (TXT1) -
FILENAME (TEST.TXT) -
FORMAT (.TXT) -
NOMSG -
SUBJECT "TEST TEXT FROM BATCH"
//*

-----Original Message-----
From: Pierre Dagenais [mailto:[login to unmask email]
Sent: 08 January 2001 16:50
To: [login to unmask email]
Subject: Trigerring an email via db2/os390 v6


Hi everyone,

I would like to facilitate and automate sending an email for all our
db2/os390 applications through the use of a trigger.
The concept is simple .

I will create a table called EMAIL ( FROM char(200), TO char(200), BODY
varchar(32000)).
I will create a trigger on insert into this table that will execute a
stored procedure called SEND_EMAIL.

So when an application needs to send an email, all the programmers
needs to do is
insert a row into the table EMAIL.

The concept is simple but I don't how which email program(s)
on os390 my stored procedure SEND_EMAIL should call?
Do you know?

As anyone done this using db2 os390 v6?
What are the limitations or drawbacks of this concept?
I need a solution that will work for mainframe or powerbuilder
applications. So I have to consider ascii and ebcdic email.
I will appreciate any insights or help you can give me.

Thanks

We are at db2 v6.1 , os390 2.8

Pierre Dagenais



[login to unmask email]

Re: Trigerring an email via db2/os390 v6
(in response to Michael Ebert)
Oooops!! Talked to my MVS guys and they said it was downloaded from the NET.
It can be found on many sites, here is one of them:-
http://www.geocities.com/lbdyck/

All the best,
Jim.

-----Original Message-----
From: [login to unmask email] [mailto:[login to unmask email]
Sent: 09 January 2001 11:06
To: [login to unmask email]
Subject: Re: Trigerring an email via db2/os390 v6


Jim,

is this a standard OS/390 REXX? If so, how can I locate it in our system? I
could not find it, a reference to it, or anybody who knows it anywhere.
For info, I have attached the job I use for sending SMTP emails from OS/390.

Dr. Michael Ebert
DB2 Database Administrator
aMaDEUS Data Processing
Erding / Munich, Germany

//OSO031MA JOB (USERJOB,ME),'M.EBERT X3962',CLASS=Y,MSGCLASS=D,
// MSGLEVEL=(1,1),REGION=0M,NOTIFY=&SYSUID
//*---------------------------------------------------------------------
//* Send mail with SMTP
//*---------------------------------------------------------------------
//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD DUMMY,SYSOUT=*
//SYSUT2 DD SYSOUT=A,DEST=SMTP,DCB=(LRECL=80,RECFM=F)
//SYSUT1 DD *
HELO MUCMVSB
MAIL FROM:<[login to unmask email]>
RCPT TO:<[login to unmask email]>
DATA
From: MVS batch job 'OSO031MA'
Subject: This is a test

If you can read this... great!

Regards, MVS batch job 'OSO031MA'
/*

From: [login to unmask email] on 09/01/2001 09:55 GMT
|--------->
| |
|--------->

>---------------------------------------------------------------------------
>
|
|

>---------------------------------------------------------------------------
>
>-------------------------------------------|
| |
>-------------------------------------------|
|--------->
|To: |
|--------->

>---------------------------------------------------------------------------
>
|[login to unmask email]
|

>---------------------------------------------------------------------------
>
>-------------------------------------------|
| |
| |
>-------------------------------------------|
|--------->
|cc: |
|--------->

>---------------------------------------------------------------------------
>
| (bcc: Michael Ebert/MUC/AMADEUS)
|

>---------------------------------------------------------------------------
>
>-------------------------------------------|
| |
| |
>-------------------------------------------|
|--------->
| |
|--------->

>---------------------------------------------------------------------------
>
|
|

>---------------------------------------------------------------------------
>
>-------------------------------------------|
| |
>-------------------------------------------|
|--------->
|Subject: |
|--------->

>---------------------------------------------------------------------------
>
|Re: Trigerring an email via db2/os390 v6
|

>---------------------------------------------------------------------------
>
>-------------------------------------------|
| |
>-------------------------------------------|



Pierre,

This is some JCL I used to send an Email with a file (TXT1) as an
attachment, thought it may help. The SYSEXEC is the library which holds the
XMITIP REXX program at your site.

Jim.

//CTS03E2A JOB (1234),'JOB',CLASS=G,MSGCLASS=X,NOTIFY=&SYSUID
//*
//SENDMAIL EXEC PGM=IKJEFT01,DYNAMNBR=35
//SYSEXEC DD DSN=RS.PROD.RLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//TXT1 DD DSN=CTS.DBA.JCL(EMAIL),DISP=SHR
//SYSTSIN DD *
%XMITIP ([login to unmask email]) -
FILEDD (TXT1) -
FILENAME (TEST.TXT) -
FORMAT (.TXT) -
NOMSG -
SUBJECT "TEST TEXT FROM BATCH"
//*

-----Original Message-----
From: Pierre Dagenais [mailto:[login to unmask email]
Sent: 08 January 2001 16:50
To: [login to unmask email]
Subject: Trigerring an email via db2/os390 v6


Hi everyone,

I would like to facilitate and automate sending an email for all our
db2/os390 applications through the use of a trigger.
The concept is simple .

I will create a table called EMAIL ( FROM char(200), TO char(200), BODY
varchar(32000)).
I will create a trigger on insert into this table that will execute a
stored procedure called SEND_EMAIL.

So when an application needs to send an email, all the programmers
needs to do is
insert a row into the table EMAIL.

The concept is simple but I don't how which email program(s)
on os390 my stored procedure SEND_EMAIL should call?
Do you know?

As anyone done this using db2 os390 v6?
What are the limitations or drawbacks of this concept?
I need a solution that will work for mainframe or powerbuilder
applications. So I have to consider ascii and ebcdic email.
I will appreciate any insights or help you can give me.

Thanks

We are at db2 v6.1 , os390 2.8

Pierre Dagenais







***************************************************************
The contents of this Email and any files transmitted with it
are confidential and intended solely for the use of the
individual or entity to whom it is addressed. The views stated
herein do not necessarily represent the view of the company.
If you are not the intended recipient of this Email you may not
copy, forward, disclose or otherwise use it or any part of it
in any form whatsoever. If you have received this mail in
error please Email the sender.
***************************************************************