Thanks,
Daryl (DJ) Johnson
DBA
Work Phone: 503.813.5451
Cell Phone: 503.706.6391
Pager: 503.202.4775
Home Phone: 503.632.4719
------------------------------------------------------------------------------
This email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies.
==============================================================================
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
Steve
Ron MacRae.
XMITIP will indeed do it. BTDTGTTS! :-)
Bob
=====
Bob Richards
SunTrust Bank
Atlanta, Georgia
Internet: bob.ri...@suntrust.com
richa...@yahoo.com
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
If you have SMTP set up on your machine this can be as simple as coding an
IEBGENER.
//JOBCARD ........
//EMAIL EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
HELO SYS1
MAIL FROM:<robz...@aol.com>
RCPT TO:<60255...@skytel.com>
DATA
FROM:<robz...@aol.com>
subject: Emergency!
Call the Data Center immediately 888-333-4444
QUIT
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
This is a very simple technique that can be incorporated in batch jobs and
REXX EXEC's. It is easily wrapped into a whole lot of administrative tools
using all the existing REXX and ISPF techniques for tons of utilities (I've
done a few of these).
In REXX you can simply EXECIO the correctly formatted SMTP message (SMTP is
documented in the IP User's Guide) from a STEM into an allocated SYSOUT using
WRITER(SMTP) to send a message from inside a REXX EXEC.
A simple, bare bones example useful in batch abends would look something like
(untested code):
/* REXX - PAGER */
parse arg oncall
mail.1 = 'HELO' MVSVAR('SYSNAME')
mail.2 = 'MAIL FROM:<robz...@aol.com>'
mail.3 = 'RCPT TO:<'oncall'>'
mail.4 = 'DATA'
mail.5 = 'FROM:<robz...@aol.com>'
mail.6 = 'Subject:' MVSVAR('SYMDEF','JOBNAME') 'failed' date() time()
mail.7 = 'Call the Data Center immediately 888-333-4444'
mail.8 = 'QUIT'
"ALLOC F(MAIL) SYSOUT(B) WRITER(SMTP)"
if RC <> 0 then say 'ALLOC error on MAIL'
"EXECIO * DISKW MAIL (STEM MAIL. FINIS"
if RC <> 0 then say 'EXECIO error on MAIL'
This would be used in a separate step of a job using JCL IF logic or COND
logic to trigger the PAGER step in the event of a problem.
// IF (ABEND) THEN
//PAGER EXEC PGM=IKJEFT01,PARM='PAGER 60255...@SKYTEL.COM'
//SYSEXEC DD DSN=your rexx.pds,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
// ENDIF
Hope This Helps,
Robert Zenuk
robz...@aol.com
Here's a sendmail rexx our Automation product uses when the
Operator enters: PAGE BEN
/* Rexx */
x=msg('OFF') ; trace('o')
parse upper arg sysprog
center_id = substr(mvsvar(sysname),1,2)
if (center_id == 'US') then from = 'Southern Operations'
if (center_id == 'UN') then from = 'Northern Operations'
select
when (sysprog == 'BEN') then
email = '70255...@mobile.mycingular.com'
otherwise
do
say "Nobody by the name of" sysprog
"found...."
say " "
exit 0
end
end
sendmail = 'echo "Call"' from '| /usr/local/bin/sendmail' email
BPXBATCH SH sendmail
exit 0
I have not used BPXBATCH, this should be interesting.
Thanks,
Daryl (DJ) Johnson
DBA
Work Phone: 503.813.5451
Cell Phone: 503.706.6391
Pager: 503.202.4775
Home Phone: 503.632.4719
-----Original Message-----
From: Ben Cowan [mailto:bco...@NEVADA.EDU]
Sent: Thursday, July 25, 2002 3:33 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: Rexx and send message to cell phone or
pager
<< File: ATT95414.txt >> We configured sendmail for
outgoing mail only.
parse upper arg sysprog
exit 0
------------------------------------------------------------------------------
This email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else, unless expressly approved by the sender or an authorized addressee, is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution or any action omitted or taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender, delete this e-mail and destroy all copies.
==============================================================================
----------------------------------------------------------------------
---
Robert_...@labcorp.com, 336 436-8066, fax -0518
(Bob Bridges, rhb...@attglobal.net)
>>> Daryl....@PACIFICORP.COM 2002-07-26 10:00:01 >>>
I have not used BPXBATCH, this should be interesting.
I tested my sample SMTP code I sent yesterday and found a small error when you try to run it a second time (no FREE). Here are two barebones working examples of SMTP from REXX. The first one (like yesterday) can be used in batch jobs. It simply sets the subject line to the JOBNAME with a DATE and TIME and provides static text in the body. The second allows you to add your own text to the email using a static subject. These can be used with any email address (not just pagers).
/* REXX - PAGER */
parse arg oncall
mail.1 = 'HELO' MVSVAR('SYSNAME')
mail.2 = 'MAIL FROM:<robz...@aol.com>'
mail.3 = 'RCPT TO:<'oncall'>'
mail.4 = 'DATA'
mail.5 = 'FROM:<robz...@aol.com>'
mail.6 = 'Subject:' MVSVAR('SYMDEF','JOBNAME') 'failed' date() time()
mail.7 = 'Call the Data Center immediately 888-333-4444'
mail.8 = 'QUIT'
"ALLOC F(MAIL) SYSOUT(B) WRITER(SMTP)"
if RC <> 0 then say 'ALLOC error on MAIL'
"EXECIO * DISKW MAIL (STEM MAIL. FINIS"
if RC <> 0 then say 'EXECIO error on MAIL'
"FREE F(MAIL)"
/* REXX - MSG */
parse arg id msg
mail.1 = 'HELO' MVSVAR('SYSNAME')
mail.2 = 'MAIL FROM:<robz...@aol.com>'
mail.3 = 'RCPT TO:<'id'>'
mail.4 = 'DATA'
mail.5 = 'FROM:<robz...@aol.com>'
mail.6 = 'Subject: Call the Data Center: 888-333-4444'
mail.7 = msg
mail.8 = 'QUIT'
"ALLOC F(MAIL) SYSOUT(B) WRITER(SMTP) REU"
if RC <> 0 then say 'ALLOC error on MAIL'
"EXECIO * DISKW MAIL (STEM MAIL. FINIS"
if RC <> 0 then say 'EXECIO error on MAIL'
"FREE F(MAIL)"
Hope This Helps,
Rob
---
Robert_...@labcorp.com, 336 436-8066, fax -0518
(Bob Bridges, rhb...@attglobal.net)
>>> Robz...@AOL.COM 2002-07-26 15:28:28 >>>
----------------------------------------------------------------------
Robert Bridges wrote:
>
> Very cool! Is there documentation on the commands, like "HELO", "MAIL", "DATA" etc? What manual should I look in?
>
> ---
> Robert_...@labcorp.com, 336 436-8066, fax -0518
> (Bob Bridges, rhb...@attglobal.net)
--
Don Poitras - SAS/C Development - SAS Institute Inc. - SAS Campus Drive
mailto:sas...@sas.com (919)531-5637 Fax:677-4444 Cary, NC 27513
-----Original Message-----
From: Robert Bridges [mailto:Robert_...@LABCORP.COM]
Sent: Tuesday, July 30, 2002 11:38 AM
To: TSO-...@VM.MARIST.EDU
Subject: Rexx and send message to cell phone or pager
Very cool! Is there documentation on the commands, like "HELO", "MAIL",
"DATA" etc? What manual should I look in?
---
Robert_...@labcorp.com, 336 436-8066, fax -0518
(Bob Bridges, rhb...@attglobal.net)
>>> Robz...@AOL.COM 2002-07-26 15:28:28 >>>
----------------------------------------------------------------------
If you are looking for something less of the "roll-your-own" flavor, you
might consider the TSO command SMTPNOTE. In my current installation, I had
to search out the SMTP server to get Robert's code to work. (I was very
pleased when it did. Kudo's to Robert.)
Another advantage is that you can send to a mixture of TSO users and
internet addresses with the same command. SMTPNOTE uses XMIT and/or SMTP as
appropriate.
SMTPNOTE [ To ( recipients ) ] [ Cc ( recipients ) | NOCc ] [ Subject (
subject ) ] [ [Dataset ( data_set_name ) | Batch ] | Reuse ]
I cut and pasted the format from the manual, but it didn't maintain its
form, so I edited it. Some of the details may have gotten messed up. See
the manual for more info:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/f1a1b910/6.2?SHEL
F=EZ2MZ201&DT=20010621083253&FS=FALSE
If you are a real glutton for punishment, can read pipelines, and want to do
attachments, I posted a REXX EXEC to send STMP mail with MIME attachments
about 18 months ago on the CMS-PIPELINES list. I can't take credit for the
STMP details: I had some very gracious help. Nevertheless, it should be
enough to get attachments working. (I hope to do so if I can just find my
round tuit.)
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of
Harrington, Mark
Sent: Tuesday, July 30, 2002 6:31 PM
To: TSO-...@VM.MARIST.EDU
>"EXECIO * DISKW MAIL (STEM MAIL. FINIS"
I think you will also have to set mail.0 = 8 or write it as
"EXECIO 8 DISKW MAIL (STEM MAIL. FINIS"
if you do something in a loop, jest drop the stem at the beginning.
Heinz
______________________________________________________________________________
WEB.DE MyPage - Ultimatives Kommunikationstool! Ihre Message sofort
online! Domain aenderbar! http://www.das.ist.aber.ne.lustige.sache.ms/
> Very cool! Is there documentation on the commands, like "HELO", "MAIL",
> "DATA" etc? What manual should I look in?
This is all in the CS IP User's Guide in Chapter 6 under Sending Electronic
Mail Using SMTP Commands.
Thanks,
Robert Zenuk
(480) 632-7230 (Home)
robz...@aol.com
>> On 26 Jul 2002 12:44:24 -0700, Robz...@AOL.COM (Robert Zenuk) wrote:
>>
>> >"EXECIO * DISKW MAIL (STEM MAIL. FINIS"
>>
>> I think you will also have to set mail.0 = 8 or write it as
>> "EXECIO 8 DISKW MAIL (STEM MAIL. FINIS"
>the mail.0 is unimportend because it will not be interpreted at a
>diskw-operation. execio will close the file at the first unassigned
>stem variable.
True - actually, it stops writing at the first stem variable which has
a null string as a value. But you may not want to allow that to
happen, for obvious reasons. Therefore, the best approach is to
set mail.0 and code:
"EXECIO" mail.0 "DISKW MAIL (STEM MAIL. FINIS"
or do it Robert's way as above - but you will have to capture the
total number of lines somehow, rather than hard-coding it.
If you are writing from the data stack rather than from a stem
variable, you could code:
"EXECIO" queued() "DISKW MAIL (FINIS"
The number of lines written, in this case, is implicitly defined by
the number of data lines queued.
- seb
> I think you will also have to set mail.0 = 8 or write it as
> "EXECIO 8 DISKW MAIL (STEM MAIL. FINIS"
I used to always put the total lines in the stem.0 variable during EXECIO *
DISKW commands. Just recently, I discovered (by accident) this is not needed
if your stems are all consecutive numbers. I found this made my maintenance
issues a little easier so I have stopped coding the stem.0 on EXECIO *
DISKW...
Thanks,
Robert Zenuk