how to remove bad record from a file?
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: how to remove bad record from a file?
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.
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.
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