You can, of course, deallocate a data set that was allocated as a result of your own JCL. You cannot deallocate a data set that was allocated as a result of the Initiator JCL.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Larry Chenevert <larrychenev...@verizon.net> Sent: Thursday, February 14, 2019 9:26 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: DEQ dynamically I wonder: can I deallocate a dataset with DYNALLOC, that has been allocated by the initiator because there is a DD statement? Kees. Table 1. Verb code 02 (dynamic unallocation) – Text unit keys, mnemonics, and functions Hex text unit key Mnemonic DYNALLOC function . 0007 DUNUNALC Specifies deallocation even if the resource has the permanently allocated attribute. . DUNUNALC specifies that the resource is to be deallocated even if it has the permanently allocated attribute. The remove in-use option key (DUNREMOV) is mutually exclusive with DUNUNALC. When you code this key, # must be zero; LEN and PARM are not specified. Example: To specify the unalloc option, code: KEY # LEN PARM 0007 0000 - - I have used this with success since the very late '70's to deallocate datasets that were allocated in JCL. It is currently in a product that is in the field. Probably the reason you don't see this so much is there is rarely a need for it. But when you need it, you need it. Larry Chenevert ---------------------------------------------------------------------- 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