by Ed Goodman » Fri Jun 24, 2011 1:12 am
Show us the output, including that first column. I'd bet lunch there is a '-' in column one of line two.
The before/after confusion will make total sense if you think about how they work...just remember that the COBOL program has to work one line at a time. So if you ask it to "put this line out, then make a blank line after it", it will write out a line, then write out a blank line so that the next record won't go there. Remember that it CAN NOT ASSUME what the next record will be.
On the other hand, if you say, "Make a blank line, then write this record", COBOL will know that it can tell the printer to skip a line by putting the '-' in column one, so it puts the data in that line too.
Now, when you LOOK at it online, you see blanks using BEFORE, but no blanks using AFTER. However, if you use your new knowledge to realize that the '-' in column 1 makes magical things happen during printing, you'll see that they will look the same once printed.