Qsn in Cobol

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Qsn in Cobol

Postby thecabbb » Sun Jul 07, 2013 7:49 pm

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.
Posts: 2
Joined: Sun Jul 07, 2013 7:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Qsn in Cobol

Postby Akatsukami » Sun Jul 07, 2013 8:14 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Global moderator
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Return to IBM Cobol


  • Related topics
    Last post