Delete a flat file in JCL.

JES2/3, JCL, utilities.
Post Reply
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

Delete a flat file in JCL.

Post by Shahid »

How can we delete a flat file in JCL? What utility should we use?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Delete a flat file in JCL.

Post by enrico-sorichetti »

does

Code: Select all

... DISP=(OLD,DELETE) 
hint anything ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Delete a flat file in JCL.

Post by Robert Sample »

Most programmers use IEFBR14 to prevent unexpected side effects.
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

Re: Delete a flat file in JCL.

Post by Shahid »

Thanks. So can I use any program and just use DISP=(OLD,DELETE)?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Delete a flat file in JCL.

Post 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.
Regards
Nic
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”