FSVO needed. If you want the space freed when the e-mail is sent instead of 
waiting for the job to end, then you need SPIN=UNALLOC. If you don't care then 
you don't.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Dale R. Smith [dale-sm...@columbus.rr.com]
Sent: Monday, May 18, 2020 12:17 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Looking for clarification/guidance on SMTP DD FREE/SPIN

On Mon, 18 May 2020 10:15:55 +0000, Seymour J Metz <sme...@gmu.edu> wrote:

>> f you allocate a DD in your JCL with SYSOUT going to SMTP, and specify 
>> FREE=CLOSE,
>> then your emails will be sent to SMTP when you close the DD in REXX, (EXECIO 
>> with FINIS option).
>> You can use the same DD over and over as long as you don't FREE it.
>
>Closing it will free it. Also, you really should have SPIN=UNALLOC.
>
>> REUSE lets you use the same DD Name over and over.
>
>You don't need REUSE when you've freed the allocation.
>
>
>--
>Shmuel (Seymour J.) Metz
>http://mason.gmu.edu/~smetz3

You are correct on the "Closing it will free it."  I forgot that I had tried 
that before and it didn't work, which is why all my code does ALLOCATE/FREE.
However, for a single email using a DD statement, SPIN=UNALLOC is not needed.  
Using FREE=CLOSE is all that is required.  I submitted a test job that sends an 
email in the first Step with just FREE=CLOSE and the second Step was a Sleep 
for 10 minutes.  I received the email while the job was still running.

--
Dale R. Smith

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to