There a couple of programs on the CBTTAPE (cbttape.org) that can empty a PDS or PDSe. As stated, the PDS command can also be used.
Using IEFBR14, you can a little simpler than what you specified. //DELETE EXEC PGM=IEFBR14 //DELETE DD DISP=(MOD,DELETE),SPACE=(TRK,(0)), // DSN=FOO.&FMID..LOAD //ALLOC EXEC PGM=IEFBR14 //NEW DD DISP=(NEW,CATLG,DELETE),.................... // DSN=FOO.&FMID..LOAD Al Nims Systems Admin/Programmer 3 Information Technology University of Florida (352) 273-1298 -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Charles Mills Sent: Monday, February 23, 2015 6:01 PM To: [email protected] Subject: Delete all members from PDS with symbolic in name? I'm trying to do the following and I know it does not work because IDCAMS says IDC2559I MEMBER CAN NOT BE SPECIFIED WITH A GENERIC NAME But is there a way to do something like this, without restricting the job to V2R1 and symbols in SYSIN? I want to delete all members of a PDS where the PDS is named with a JCL symbol: //DELETMEM EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //OUTLOAD DD DISP=(OLD,KEEP),DSN=FOO.&FMID..LOAD //SYSIN DD * DELETE FOO.*.LOAD(*) NONVSAM FILE(OUTLOAD) /* I suppose I could do something with IEFBR14 and allocate a new dataset with a temporary name in one step and then delete the old dataset and rename the new one in the next step. Is there something easier? Thanks, 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
