What level of z/OS are you running? The DEL command can use MASK at z/OS V1.11 and above (also check for additional maintanence)
In z/OS V1R11, DFSMS access method services (IDCAMS) adds a new MASK option to the DELETE command. This option lets you specify many variations of a data set name on a single deletion, using new wild card characters and rules to give more flexibility in selecting the data sets to be deleted. Previously, only one data set qualifier could be replaced by a wild card on a DELETE command. For example: DELETE A.*.C would delete data sets with A as the first qualifier, any second qualifier, and C as the third qualifier, such as A.B.C or A.BB.C. With the new MASK keyword, you can replace multiple qualifiers with wild cards, and can replace specific characters in a qualifier name with wild cards as well. The MASK keyword treats a single asterisk in the same way as the generic DELETE command. For example DELETE A.*.C MASK specifies a data set with A and C as the first and third qualifiers, and a second qualifier with any set of characters. In addition, the MASK keyword allows two consecutive asterisks to replace multiple qualifier names. For example, the entry name DELETE A.**.B MASK means all data set names of two or more levels with A as the first qualifier, and B as the last qualifier. A.B.** means all data set names of two or more levels where A is the first qualifier and B is the second (or last) qualifier. Double asterisks cannot be part of a qualifier name; they must be preceded or followed by either a period or a blank character. The MASK keyword also accepts percent signs (%) was wild cards to replace individual characters in the same position. You can specify from one to eight percent signs in each qualifier. For example, DELETE A%DE MASK would match a data set named ABDE, while DELETE A%%D% MASK would match one named ABCDE. The DELETE MASK command allows only one data set entry-name to be specified. If multiple entry-names are specified, the DELETE request will fail with error messages. If more than 100 data set names are filtered from the wild card notation, AMS only deletes the first 100 data sets identified by the filtering process. If you do not specify the MASK keyword on the DELETE command, or explicitly specify NOMASK, the previous wild card rules remain in effect (one asterisk can replace one qualifier in a data set name). For more information about using the new MASK keyword on the IDCAMS DELETE command, see z/OS DFSMS Access Method Services for Catalogs. I would think you could do DEL GDGBASE.* followed by DEL GDGBASE GDG Lizette -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rob JACKSON Sent: Tuesday, August 27, 2013 5:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: REXX and CLISTs to generate code to delete empty GDG bases I have received a request for expertise coding REXX and CLISTs to generate code to delete empty GDG bases. Thanks, Rob Jackson rwjackso...@msn.com Cell: (615) 689-1435 Home: (615) 697-2047 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN