can you tell me the logic to read all the records but write only the odd records to a new file.
Most of us can - but that is not why the forum is here. We are here to help you learn, not provide coded solutions for your homework or whatever.
You need to show what you have tried and where there are problems or questions. If you cannot get the code going, post in English how you see this happening (hint - this is not a difficult exercise, so do not make it difficult).
Is this your first cobol program?
As suggested, write a program that reads and writes all of the records. Then we can talk about how to alternate. . .