Page 1 of 1

Qsn in Cobol

PostPosted: Sun Jul 07, 2013 7:49 pm
by thecabbb
I have a req where from a file, I have to read, process and write first 3 records and skip the next three, then read first 3 and skip the next three and so on.
Plz give your inputs on how this can be done. thanks.

Re: Qsn in Cobol

PostPosted: Sun Jul 07, 2013 8:14 pm
by Akatsukami
Have a counter and a flag. After reading every three records, toggle the flag. Process the record or not depending on how the flag is set.