And you didn't ask this yet, but there's a reason your program is only
processing every other line of the input. That's because you read a line
into the variable "oneline" in your while-clause, then in the very next line
of code, you read another line into that same variable. So you will only be
processing the even-numbered records and ignoring the odd-numbered records.