Oops. You're right. I cloned an old basic example that did not do that.
Thanks,
Rob
In a message dated 9/11/2008 9:50:43 A.M. US Mountain Standard Time,
***@CTB.COM writes:
I would guess that the QUIT wound up in your message body because you
did not have an empty line before it.
The empty line signals SMTP that the body of the message has ended, and
SMTP goes back into a state where it is expecting commands (analogous to
/* following DD * in JCL).
Instead of:
mail.7 = msg
mail.8 = 'QUIT'
Try:
mail.7 = msg
mail.8 = '' /* indicate end of message body */
mail.9 = 'QUIT'
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Ken MacKenzie
Sent: Thursday, September 11, 2008 07:13
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution
Interestingly, if I put QUIT in my SMTP instructions, it is included in
the
body of the email. It works perfectly well without QUIT.
(And this is whether I use the OP's desired method of IEBGENER or my
preferred method of just writing straight SYSOUT.)
Ken MacKenzie
PRAMERICA SYSTEMS IRELAND LIMITED
is a private company limited by shares,
incorporated and registered in the Republic of Ireland
with registered number 319900 and registered office at:
6th Floor,
South Bank House,
Barrow Street,
Dublin 4,
Ireland.
"Dunkel, Martin"
<***@NA
TIONALCITY.COM>
To
TSO-***@VM.MARIST.EDU
Sent by: TSO REXX
cc
Discussion List
<TSO-***@VM.MARI
Subject
ST.EDU> Re: [TSO-REXX] REXX - IEBGENER -
SYSUT2 message routing for each
IEBGENER execution
Thu 09/11/2008
02:59 PM
Please respond to
TSO REXX
Discussion List
<TSO-***@VM.MARI
ST.EDU>
Rob,
I think the thing to note here with your example Rob is that after each
email, you have a "QUIT" telling SMTP to end the email. I think in the
original question / example, there was only one "QUIT". Keep in mind,
"QUIT" has nothing to do with Rexx, rather it is an SMTP directive.
And, regarding a related question earlier, if you allocate a DD in your
JCL, then there is no need to reallocate it from within your Rexx code
unless you FREE'd the DD from within the program. If you do FREE a DD
in your program, but you need it again, then you would need to allocate
in again from your program.
Thanks! MPD
Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Robert Zenuk
Sent: Thursday, September 11, 2008 9:45 AM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution
Here is a working pure REXX solution:
/* REXX - SMTPMANY */
/*********************************************************************/
/* Send 3 emails
*/
/*********************************************************************/
call email ***@aol.com_ (mailto:***@aol.com) 'This is a
test'
call email ***@aol.com_ (mailto:***@aol.com) 'This is a
another
test'
call email ***@aol.com_ (mailto:***@aol.com) 'This is the
last
test'
exit 0
/*********************************************************************/
/* The email subroutine
*/
/*********************************************************************/
email: parse arg id msg
mail.1 = 'HELO' MVSVAR('SYSNAME')
mail.2 = 'MAIL FROM:<***@aol.com>'_ (mailto:***@aol.com>')
mail.3 = 'RCPT TO:<'id'>'
mail.4 = 'DATA'
mail.5 = 'FROM:<***@aol.com>'_ (mailto:***@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 for' id
"EXECIO * DISKW MAIL (STEM MAIL. FINIS"
if RC <> 0 then say 'EXECIO error on MAIL for' id
"FREE F(MAIL)"
return
Rob
In a message dated 9/11/2008 4:55:25 A.M. US Mountain Standard Time,
***@EDS.COM writes:
Hi,
I gave the SYSUT2 in JCL. Hence, I am not sure that how I can allocate
the SYSUT2 in REXX program.
//SYSUT2 DD SYSOUT=(B,NETISMTP)
Also, I am not sure whether CLASS B is a standard class and SMTP can be
change any time. For my project, I need to use NETISMTP. The SYSUT2
output will goes to another region and send the email.
Hence, I preferred to allocate the SYSUT2 in JCL to change any time if
required.
If we FREE the SYSUT2 in REXX program, can we allocate it again with
reference on JCL.
Thanks and Regards,
Gangireddy Siva Pratap Reddy
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
Behalf
Of Lizette Koehler
Sent: Thursday, September 11, 2008 4:59 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution
I don't know that you need the SPIN on the FREE command.
The SPIN keyword specified on the FREE command overrides the SPIN
keyword specified on the ALLOCATE command.
ON the ALLOC command, if the SPIN keyword is not specified, ALLOCATE
assumes SPIN=UNALLOC.
If it is not freeing and spinning the dataset, then it could be
aparable.
Have you verified that the output is not spinning when the FREE is
done?
Have you looked to see what sysout class it is sitting in? And is it
attached or or a separate JOE on Spool?
Lizette
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Martin Cox
> Sent: Thursday, September 11, 2008 6:31 AM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> Try using SPIN(UNALLOC) on the FREE for SYSUT2. This will release the
> SYSOUT file for "printing" immediately rather than at job
termination.
> I don't see the need to use IEBGENER.
>
> Address TSO
> "ALLOC F(SYSUT2) SYSOUT(B) DEST(NETISMTP) REUS"
> Address MVS "EXECIO * DISKW SYSUT2 (STEM EMAILT. FINIS"
> "FREE F(SYSUT2) SPIN(UNALLOC)"
>
> Cheers
> Martin
>
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Ken MacKenzie
> Sent: 11 September 2008 11:15
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> Here's a working example. You will have to change one or two things
> but it should work for you. It sends me two mails.
>
> /* REXX */
> "ALLOC F(SYSUT1) SPACE(1 1) TRACKS NEW REUS"
> Queue 'HELO ZAZ0 '
> Queue 'MAIL FROM:<***@mydomain.com> '
> Queue 'RCPT TO:<***@mydomain.com> '
> Queue 'DATA '
> Queue 'Subject: e-Mailing from batch job '
> Queue 'To: ***@mydomain.com '
> Queue 'Email Test (One) from REXX '
> Queue ''
> "EXECIO * DISKW SYSUT1 (FINIS"
> "ALLOC F(SYSUT2) SYSOUT(B) DEST(SMTP) REUS"
> "CALL *(IEBGENER)"
> "FREE F(SYSUT1, SYSUT2)"
>
> "ALLOC F(SYSUT1) SPACE(1 1) TRACKS NEW REUS"
> Queue 'HELO ZAZ0 '
> Queue 'MAIL FROM:<***@mydomain.com> '
> Queue 'RCPT TO:<***@mydomain.com> '
> Queue 'DATA '
> Queue 'Subject: e-Mailing from batch job '
> Queue 'To: ***@mydomain.com '
> Queue 'Email Test (Two) from REXX '
> Queue ''
> "EXECIO * DISKW SYSUT1 (FINIS"
> "ALLOC F(SYSUT2) SYSOUT(B) DEST(SMTP) REUS"
> "CALL *(IEBGENER)"
> "FREE F(SYSUT1, SYSUT2)"
>
>
>
> Ken MacKenzie
> PRAMERICA SYSTEMS IRELAND LIMITED
> is a private company limited by shares, incorporated and registered
in
> the Republic of Ireland with registered number 319900 and registered
> office at:
> 6th Floor,
> South Bank House,
> Barrow Street,
> Dublin 4,
> Ireland.
>
>
>
> "Gangireddy, Siva
> Pratap Reddy"
> <sivapratapreddy.
> To
> ***@EDS.CO TSO-***@VM.MARIST.EDU
> M>
> cc
>
> Sent by: TSO REXX
> Subject
> Discussion List Re: [TSO-REXX] REXX - IEBGENER
-
> <TSO-***@VM.MARI SYSUT2 message routing for each
> ST.EDU> IEBGENER execution
>
>
>
> Thu 09/11/2008
> 11:04 AM
>
>
> Please respond to
> TSO REXX
> Discussion List
> <TSO-***@VM.MARI
> ST.EDU>
>
>
>
>
>
>
>
> Hi,
>
> Thank you for your response. We think, messages will be route to
> destination only after the completion of job. In this case, second
> email will sent. But first email will be lost.
>
>
> Thanks and Regards,
> Gangireddy Siva Pratap Reddy
>
> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Ken MacKenzie
> Sent: Thursday, September 11, 2008 2:47 PM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> Try changing the SYSUT2 allocation so that you do it in the REXX
> rather than the JCL.
>
> Code:
>
> "ALLOC F(SYSUT2) SYSOUT(B) DEST(NETISMTP) REUS"
>
> every time.
>
>
>
> Ken MacKenzie
> PRAMERICA SYSTEMS IRELAND LIMITED
> is a private company limited by shares, incorporated and registered
in
> the Republic of Ireland with registered number 319900 and registered
> office at:
> 6th Floor,
> South Bank House,
> Barrow Street,
> Dublin 4,
> Ireland.
>
>
>
> "Gangireddy, Siva
> Pratap Reddy"
> <sivapratapreddy.
> To
> ***@EDS.CO TSO-***@VM.MARIST.EDU
> M>
> cc
>
> Sent by: TSO REXX
> Subject
> Discussion List [TSO-REXX] REXX - IEBGENER -
> SYSUT2
> <TSO-***@VM.MARI message routing for each
> IEBGENER
> ST.EDU> execution
>
>
>
> Thu 09/11/2008
> 09:59 AM
>
>
> Please respond to
> TSO REXX
> Discussion List
> <TSO-***@VM.MARI
> ST.EDU>
>
>
>
>
>
>
> Hi,
>
> My requirement is, REXX program need to send email twice. It is
> working for one email. It is not working for second email. We are
> using IEBGENER to send the email. Also, first and second emails are
> combined.
>
> In JCL, I has the code as below.
>
> //SYSUT2 DD SYSOUT=(B,NETISMTP)
>
> In REXX, the IEBGENER is calling as below for two times.
>
> ADDRESS TSO
> "ALLOC F(SYSUT1) UNIT(SYSDA) LRECL(80) SPACE(1) TRACKS RECFM(F B)"
> "EXECIO * DISKW SYSUT1 (STEM EMAILT. FINIS"
> "IEBGENER"
> "FREE F(SYSUT1)"
>
> I feel, we need to submit the external job for each email. But it is
> not a good to submit another job. Because, production jobs may have
> class restrictions. Is there any way to route the SYSUT2 output
> without submitting the extra job from REXX.
>
> Thanks and Regards,
> Gangireddy Siva Pratap Reddy
>
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
**************Psssst...Have you heard the news? There's a new fashion
blog,
plus the latest fall trends and hair styles at StyleList.com.
(http://www.stylelist.com/trends?ncid=aolsty00050000000014)
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
------------------------------------------------------------------------
-------------------
***National City made the following annotations
------------------------------------------------------------------------
-------------------
This communication is a confidential and proprietary business
communication.
It is intended solely for the use of the designated recipient(s). If
this
communication is received in error, please contact the sender and delete
this communication.
========================================================================
===================
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
--------------------------------------------------------
The information contained in this message is intended only for the
recipient, and may be a confidential attorney-client communication or may otherwise be
privileged and confidential and protected from disclosure. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, please be aware
that any dissemination or copying of this communication is strictly prohibited.
If you have received this communication in error, please immediately notify
us by replying to the message and deleting it from your computer. The
McGraw-Hill Companies, Inc. reserves the right, subject to applicable local law, to
monitor and review the content of any electronic message or information sent
to or from McGraw-Hill employee e-mail addresses without informing the sender
or recipient of the message.
--------------------------------------------------------
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
**************Psssst...Have you heard the news? There's a new fashion blog,
plus the latest fall trends and hair styles at StyleList.com.
(http://www.stylelist.com/trends?ncid=aolsty00050000000014)
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX