I think the first principle. A module saves registers on the way in and restores them on the way out. In other words, it leaves the environment as it found it (other than whatever chore it was supposed to perform).
I am kind of surprised at the behavior you see. Freeing a DD name takes a certain amount of effort -- and very non-trivial effort at the time IEBGENER first came to life. IEBGENER especially was written 99% to run as a jobstep program where freeing a DD would be pointless. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Friday, November 20, 2015 9:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Should utilities FREE DDNAMEs? In a program, I am passed a DDNAME allocated by another program. I'd like to use it twice, once as IEBGENER SYSUT1 and once as TSO RECEIVE INDD. Either works by itself. But each utility seems to FREE its DDNAME before returning (is this documented, or perhaps common knowledge?), so I can't use it for the other. There's a principle that utilities should be discreet, do nothing they aren't required to, and return the caller's evironment with as little change as possible. OTOH, there's a contrary principle that common chores should be left in subroutines, avoiding redundant code in callers. Which should prevail? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN