how to remove bad record from a file?

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
Vinod M
Registered Member
Posts: 10
Joined: Mon Jan 27, 2014 10:39 am

how to remove bad record from a file?

Post by Vinod M »

how to remove bad record from a file?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: how to remove bad record from a file?

Post by Robert Sample »

Well, that depends partly on the format of the data set.

For a VSAM KSDS, you can program a DELETE command for the key of the bad record.

For a VSAM ESDS or other sequential data set, you copy the entire data set to another one, omitting the bad record. Copying it back to the original location is optional.

For a VSAM RRDS, you may need to rebuild it without the bad record.

For a VSAM LDS, you don't have a bad record because LDS are not record-oriented.

For a PDS or PDSE, you have to know which member contains the bad record and handle it like a sequential data set.

Depending upon your system and the size of the data set, you may be able to use ISPF EDIT to delete the bad record -- but this is not guaranteed to be possible.
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 “Other Mainframe Topics, Off-Topics, FAQs.”