How can I delete particular records in a ksds file whose RECFB=FB and LRECL=80 ? All keys of those records are 999 and begin at 20th positions.
Can I do that using DFSORT utility and same ksds file.
If the KSDS is defined with REUSE, you can use DFSORT's VSAMIO and RESET options along with the OMIT and SORT statements to delete specific records from the KSDS. The VSAMIO option allows a VSAM file defined with REUSE to be sorted in-place (that is, the same VSAM file can be used for input and output).
Note that this kind of "suicide sort" is not recommended unless you can afford to lose the VSAM file if something goes wrong. It's safer to go from the VSAM file to a temporary file and then from the temporary file back to the VSAM file.
Thank you very much again & again as. You are always very helpful. I would like to try that kind of 'suicide sort' . In the light of your suggest, I will make a copy of Vsam file at earlier steps in the jcl...
Thank you again.