Discussion:
REXX - IEBGENER - SYSUT2 message routing for each IEBGENER execution
(too old to reply)
Gangireddy, Siva Pratap Reddy
2008-09-11 08:59:43 UTC
Permalink
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
Ken MacKenzie
2008-09-11 09:17:39 UTC
Permalink
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
Gangireddy, Siva Pratap Reddy
2008-09-11 10:05:20 UTC
Permalink
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

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Ken MacKenzie
2008-09-11 10:14:54 UTC
Permalink
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

----------------------------------------------------------------------
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
Martin Cox
2008-09-11 10:31:03 UTC
Permalink
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

----------------------------------------------------------------------
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

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Lizette Koehler
2008-09-11 11:29:20 UTC
Permalink
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
Gangireddy, Siva Pratap Reddy
2008-09-11 11:55:13 UTC
Permalink
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
Lizette Koehler
2008-09-11 12:37:40 UTC
Permalink
In the TSO environment, when you FREE a DD statement it is automatically
released. The default for ALLOC is SPIN(UNALLOC). So no need to specify
it.
In JCL, if you have multiple steps, you will need to add the FREE and SPIN
parms in order to do the same thing.


If you use JCL then I would recommend the following

//SYSUT2 DD SYSOUT=(B,NETISMTP),FREE=CLOSE,SPIN=UNALLOC

That way you can have multiple steps and free and spin the sysout as you go.

Lizette


> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Gangireddy, Siva Pratap Reddy
> Sent: Thursday, September 11, 2008 7:53 AM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> 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
Gangireddy, Siva Pratap Reddy
2008-09-11 13:02:26 UTC
Permalink
In this case, do I need to FREE the SYSUT2 in program?

I tested the program. But I did not got the second email.

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 6:06 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

In the TSO environment, when you FREE a DD statement it is automatically
released. The default for ALLOC is SPIN(UNALLOC). So no need to
specify it.
In JCL, if you have multiple steps, you will need to add the FREE and
SPIN parms in order to do the same thing.


If you use JCL then I would recommend the following

//SYSUT2 DD SYSOUT=(B,NETISMTP),FREE=CLOSE,SPIN=UNALLOC

That way you can have multiple steps and free and spin the sysout as you
go.

Lizette


> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Gangireddy, Siva Pratap Reddy
> Sent: Thursday, September 11, 2008 7:53 AM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> 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
Gangireddy, Siva Pratap Reddy
2008-09-11 13:08:24 UTC
Permalink
The below message displayed in SPOLL.

DATA SET UTILITY - GENERATE
IEB316I DDNAME SYSUT2 CANNOT BE OPENED



Thanks and Regards,
Gangireddy Siva Pratap Reddy

-----Original Message-----
From: Gangireddy, Siva Pratap Reddy
Sent: Thursday, September 11, 2008 6:32 PM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution


In this case, do I need to FREE the SYSUT2 in program?

I tested the program. But I did not got the second email.

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 6:06 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

In the TSO environment, when you FREE a DD statement it is automatically
released. The default for ALLOC is SPIN(UNALLOC). So no need to
specify it.
In JCL, if you have multiple steps, you will need to add the FREE and
SPIN parms in order to do the same thing.


If you use JCL then I would recommend the following

//SYSUT2 DD SYSOUT=(B,NETISMTP),FREE=CLOSE,SPIN=UNALLOC

That way you can have multiple steps and free and spin the sysout as you
go.

Lizette


> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Gangireddy, Siva Pratap Reddy
> Sent: Thursday, September 11, 2008 7:53 AM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> 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
Ken MacKenzie
2008-09-11 13:12:52 UTC
Permalink
I just ran my exec (see earlier post) in a batch job using the following
JCL and it still worked OK - I got two mails.

//X117424@ JOB (B,X,29PS00,C),'K MACKENZIE',
// TIME=(0,5),
// NOTIFY=&SYSUID,MSGCLASS=Y
//MAIL EXEC PGM=IKJEFT1A,
// PARM='RXMAIL'
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSEXEC DD DISP=SHR,
// DSN=BX29PS.X117424.EXEC



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
02:07 PM


Please respond to
TSO REXX
Discussion List
<TSO-***@VM.MARI
ST.EDU>






The below message displayed in SPOLL.

DATA SET UTILITY - GENERATE
IEB316I DDNAME SYSUT2 CANNOT BE OPENED



Thanks and Regards,
Gangireddy Siva Pratap Reddy

-----Original Message-----
From: Gangireddy, Siva Pratap Reddy
Sent: Thursday, September 11, 2008 6:32 PM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution


In this case, do I need to FREE the SYSUT2 in program?

I tested the program. But I did not got the second email.

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 6:06 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

In the TSO environment, when you FREE a DD statement it is automatically
released. The default for ALLOC is SPIN(UNALLOC). So no need to
specify it.
In JCL, if you have multiple steps, you will need to add the FREE and
SPIN parms in order to do the same thing.


If you use JCL then I would recommend the following

//SYSUT2 DD SYSOUT=(B,NETISMTP),FREE=CLOSE,SPIN=UNALLOC

That way you can have multiple steps and free and spin the sysout as you
go.

Lizette


> -----Original Message-----
> From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On
> Behalf Of Gangireddy, Siva Pratap Reddy
> Sent: Thursday, September 11, 2008 7:53 AM
> To: TSO-***@VM.MARIST.EDU
> Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
> each IEBGENER execution
>
> 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

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Robert Zenuk
2008-09-11 13:46:29 UTC
Permalink
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
Dunkel, Martin
2008-09-11 13:59:38 UTC
Permalink
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
Ken MacKenzie
2008-09-11 14:12:49 UTC
Permalink
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
Cruz, Robert
2008-09-11 16:49:46 UTC
Permalink
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
Dunkel, Martin
2008-09-11 14:51:44 UTC
Permalink
One other thought...

I think I spoke too soon on the SMTP QUIT part. I think I gave
incorrect info. But, here's another thing to try:

Rather than reallocating SYSUT2, just close the file after outputting to
it:

"IEBGENER"
"EXECIO 0 DISKW SYSUT2 (FINIS)"

See if this will spool out the first email and separate it from the
second email.


Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 9:59 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

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
Gangireddy, Siva Pratap Reddy
2008-09-11 15:19:06 UTC
Permalink
We tested this, first and second emails are merged and received as one
email.

Thanks and Regards,
Gangireddy Siva Pratap Reddy

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Dunkel, Martin
Sent: Thursday, September 11, 2008 8:21 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

One other thought...

I think I spoke too soon on the SMTP QUIT part. I think I gave
incorrect info. But, here's another thing to try:

Rather than reallocating SYSUT2, just close the file after outputting to
it:

"IEBGENER"
"EXECIO 0 DISKW SYSUT2 (FINIS)"

See if this will spool out the first email and separate it from the
second email.


Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 9:59 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

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
Rick Woods
2008-09-11 17:24:42 UTC
Permalink
I just posted this, but got an "undeliverable" message so I don't know if it went through. So here it is again:

I just did this, and got two emails with the correct two values:

/* REXX */
TRACE r
call email "value1"
call email "value2"
exit

email:
ARG var
"FREE FI(OUT)"
"ALLOC FI(OUT) SYSOUT(B) WRITER(SMTP)"
SYSUT1.1 = "HELO" MVSVAR("SYMDEF","JES2NODE")
SYSUT1.2 = "MAIL FROM:***@myaddr ( mailto:***@myaddr )"
SYSUT1.3 = "RCPT TO:***@email.xx ( mailto:***@email.xx )"
SYSUT1.4 = "DATA"
SYSUT1.5 = "FROM:rick"
SYSUT1.6 = "TO: ***@email.xx ( mailto:***@email.xx )"
SYSUT1.7 = "CC:"
SYSUT1.8 = "SUBJECT:" "test"
SYSUT1.9 = var
SYSUT1.10 = "."
SYSUT1.11 = "QUIT"
SYSUT1.0 = 11
ADDRESS MVS "EXECIO * DISKW OUT (STEM SYSUT1. FINIS)"
"FREE FI(OUT)"
return

- Rick



>>> "Gangireddy, Siva Pratap Reddy" <***@EDS.COM> 9/11/2008 8:18 AM >>>

We tested this, first and second emails are merged and received as one
email.

Thanks and Regards,
Gangireddy Siva Pratap Reddy

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Dunkel, Martin
Sent: Thursday, September 11, 2008 8:21 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

One other thought...

I think I spoke too soon on the SMTP QUIT part. I think I gave
incorrect info. But, here's another thing to try:

Rather than reallocating SYSUT2, just close the file after outputting to
it:

"IEBGENER"
"EXECIO 0 DISKW SYSUT2 (FINIS)"

See if this will spool out the first email and separate it from the
second email.


Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 9:59 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

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

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Ron Wells
2008-09-11 18:01:13 UTC
Permalink
I have a need to turn off TSO broadcast msg's being sent...

is there a way...

example

I sub a job...
I transfer it...nje to another system and I get the SEND msg to my
id....can that be stopped??

----------------------------------------------------------------------
Email Disclaimer
This E-mail contains confidential information belonging to the sender, which may be legally privileged information. This information is intended only for the use of the individual or entity addressed above. If you are not the intended recipient, or an employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution, or the taking of any action in reliance on the contents of the E-mail or attached files is strictly prohibited.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Bob Stark
2008-09-11 18:41:25 UTC
Permalink
Ron,

I think if you issue
TSO PROFILE NOINTERCOM
It will turn those off. The setting gets saved for you, so you should not
have to re-issue it after you logoff.

Regards,

Bob Stark

ProTech - When you're serious about Systems Management
Consulting, Software, and Training for z/OS, UNIX and Internet
www.protechtraining.com 800-373-9188 x151 Mobile: 412-445-8072

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of
Ron Wells
Sent: Thursday, September 11, 2008 2:01 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: TSO broadcast



I have a need to turn off TSO broadcast msg's being sent...

is there a way...

example

I sub a job...
I transfer it...nje to another system and I get the SEND msg to my id....can
that be stopped??

----------------------------------------------------------------------
Email Disclaimer
This E-mail contains confidential information belonging to the sender,
which may be legally privileged information. This information is intended
only for the use of the individual or entity addressed above. If you are
not the intended recipient, or an employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or the taking of any action in reliance
on the contents of the E-mail or attached files is strictly prohibited.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email
to ***@VM.MARIST.EDU with the message: INFO TSO-REXX



--
If this email is spam, report it here:
http://www.onlymyemail.com/view/?action=reportSpam&Id=Mzg3MzE6NzQyOTE4NTc1Om
JzdGFya0Bwcm90ZWNocHRzLmNvbQ%3D%3D

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Pete Conlin
2008-09-11 18:53:17 UTC
Permalink
Ron,

Please be more specific. Is this the BROADCAST message such as that
generated when you issue LISTBC?

There are myriad messages issued via system/JES2/RSCS generated SEND.

I've never seen the BROADCAST message issued here (early MVS/SP thru
z/OS 1.10 early release) or at numerous customer sites, except at LOGON
or via LISTBC.

From dfSMShsm recalls to output routing, we're often "bothered" by
messages we don't want & usually didn't ask for, interrupting our
concentration, sessions & sometimes even connectivity.

As Rob and Bob indicate, your PROFILE settings affect some of this, but
without more details (your command initiating the message generation and
the SEND record (hopefully in SYSLOG), I don't think a confirmed/viable
solution can be offered (though it could probably eventually be
guessed).

Peter
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Ron Wells
Sent: Thursday, September 11, 2008 2:01 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: TSO broadcast

I have a need to turn off TSO broadcast msg's being sent...

is there a way...

example

I sub a job...
I transfer it...nje to another system and I get the SEND msg to my
id....can that be stopped??

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Bill Turner, WB4ALM
2008-09-11 23:04:22 UTC
Permalink
I beleive that PROFILE NOINTERCOM is what you want...

Any messages sent to you while NOINTERCOM is the default gets saved in
SYS1.BRODCAST or in userid.BRODCAST data set and you will get them get
them during the next logon unless, another PROFILE option is also set.

(Exactly which dataset is used is dependent on the system Parms set up
by your TSO System Support Staff.)

You can see what your defaults are by entering "PROFILE" at a ready
prompt or from ISPF option 6.

As it turns out, there are a number of "send" messages that cannot be
turned off,
so it is not possible to do what you want on a permanent and total basis.

The best you can do is "minimize" them.

/s/ Bill Turner, wb4alm
Systems Support Programmer - TSO (retired)

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Dunkel, Martin
2008-09-11 15:01:50 UTC
Permalink
Please ignore any of my posts today. My mind is elsewhere.

Two people have provided decent working examples. Focus on those.

Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 10:51 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

One other thought...

I think I spoke too soon on the SMTP QUIT part. I think I gave
incorrect info. But, here's another thing to try:

Rather than reallocating SYSUT2, just close the file after outputting to
it:

"IEBGENER"
"EXECIO 0 DISKW SYSUT2 (FINIS)"

See if this will spool out the first email and separate it from the
second email.


Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 9:59 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

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
Rick Woods
2008-09-11 15:10:58 UTC
Permalink
Martin,
Sounds like you should take the rest of the week off ;0)
- Rick

>>> "Dunkel, Martin" <***@NATIONALCITY.COM> 9/11/2008 8:01 AM >>>
Please ignore any of my posts today. My mind is elsewhere.

Two people have provided decent working examples. Focus on those.

Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 10:51 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

One other thought...

I think I spoke too soon on the SMTP QUIT part. I think I gave
incorrect info. But, here's another thing to try:

Rather than reallocating SYSUT2, just close the file after outputting to
it:

"IEBGENER"
"EXECIO 0 DISKW SYSUT2 (FINIS)"

See if this will spool out the first email and separate it from the
second email.


Thanks! MPD

Martin Dunkel
National City Corporation
Turnover Support / ChangeMan ZMF
(w) 216-257-5354
(p) ***@archwireless.net


-----Original Message-----
From: Dunkel, Martin
Sent: Thursday, September 11, 2008 9:59 AM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

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
Rick Woods
2008-09-11 13:48:52 UTC
Permalink
Just curious: why does it have to be sent twice? I can't picture a scenario that would call for that, rather than just having two sending addresses.
- Rick

>>> "Gangireddy, Siva Pratap Reddy" <***@EDS.COM> 9/11/2008 1:59 AM >>>
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
Gangireddy, Siva Pratap Reddy
2008-09-11 14:35:58 UTC
Permalink
In FTP, we have two statements GET and PUT. The email body message is
different for file putting to / Getting from server.

Hence we need to send two separate emails.

Thanks and Regards,
Gangireddy Siva Pratap Reddy

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf
Of Rick Woods
Sent: Thursday, September 11, 2008 7:18 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] REXX - IEBGENER - SYSUT2 message routing for
each IEBGENER execution

Just curious: why does it have to be sent twice? I can't picture a
scenario that would call for that, rather than just having two sending
addresses.
- Rick

>>> "Gangireddy, Siva Pratap Reddy" <***@EDS.COM>

>>> 9/11/2008 1:59 AM >>>
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

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Robert Zenuk
2008-09-11 17:02:57 UTC
Permalink
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
Robert Zenuk
2008-09-11 18:35:38 UTC
Permalink
Look at the TSO PROFILE command.

Rob




In a message dated 9/11/2008 11:01:14 A.M. US Mountain Standard Time,
***@AGFINANCE.COM writes:

I have a need to turn off TSO broadcast msg's being sent...

is there a way...

example

I sub a job...
I transfer it...nje to another system and I get the SEND msg to my
id....can that be stopped??

----------------------------------------------------------------------
Email Disclaimer
This E-mail contains confidential information belonging to the sender,
which may be legally privileged information. This information is intended
only for the use of the individual or entity addressed above. If you are
not the intended recipient, or an employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or the taking of any action in reliance on the
contents of the E-mail or attached files is strictly prohibited.

----------------------------------------------------------------------
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
Loading...