Haven't you switched to CSSMTP? What's the drop dead date on SMTP? There are two spin issues:
Yes, you have to spin it, and FREE will do the job. With FREE=CLOSE you don't need an explicit FREE. Do you want the SPOOL space release after the e-mail goes out? If you do dynamic allocation then you need to use the right options. Once you do a FREE the ddname is not known to your job. Why put it in your JCL at all. If you have to submit an e-mail more than once, then dynamically allocate the SYSOUT every time and use the returned ddname. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Charles Mills [[email protected]] Sent: Friday, May 15, 2020 4:08 PM To: [email protected] Subject: Looking for clarification/guidance on SMTP DD FREE/SPIN I am designing a long-running Rexx program that will from time to time generate an e-mail via the SMTP server. The idea is to allocate a DD SYSOUT=(B,SMTP) and write the SMTP commands to it. I've never done that before so I have some questions: - Am I correct in my assumption that I will have to "spin" the dataset before the SMTP server will pick it up? - Assuming Yes to the first question, am I correct (a.) that FREE=CLOSE,SPIN=UNALLOC on the DD will get the records over to SMTP on EXECIO (FINIS; but that (b.) at that point the DD "no longer exists" -- that I will get an error if I try to open it again? (Recall the program is "long-running" and needs to generate multiple e-mails "from time to time." They need to go out more or less as created, not in a big batch later on.) - Not a huge deal if so, I guess. I can use BPXWDYN to allocate my DD again and again rather than JCL. Anyone have any better ideas? Thanks. Outside-the-above-box suggestions cheerfully considered. I'm pretty much set on Rexx, e-mails, and "long-running with multiple e-mails from time to time" but will consider other possibilities. Charles ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
