Page 1 of 1

Delete a flat file in JCL.

Posted: Sun Oct 15, 2017 2:01 pm
by Shahid
How can we delete a flat file in JCL? What utility should we use?

Re: Delete a flat file in JCL.

Posted: Sun Oct 15, 2017 5:27 pm
by enrico-sorichetti
does

Code: Select all

... DISP=(OLD,DELETE) 
hint anything ?

Re: Delete a flat file in JCL.

Posted: Sun Oct 15, 2017 5:56 pm
by Robert Sample
Most programmers use IEFBR14 to prevent unexpected side effects.

Re: Delete a flat file in JCL.

Posted: Thu Oct 19, 2017 6:09 pm
by Shahid
Thanks. So can I use any program and just use DISP=(OLD,DELETE)?

Re: Delete a flat file in JCL.

Posted: Thu Oct 19, 2017 6:20 pm
by nicc
That would depend on what you and why you are trying to delete. I would not use your bill writing program simply to clean up a few stray dtat sets - you do not want the bills except at bill production time. To simply delete datasets use, as has been suggested, IEFBR14 because it is a program that does nothing - it starts and it then ends. Nothing more. Your JCL statements are actioned by the operating system - not by the program.