By now it is already the second way to solve this problem, I know.
The first was found as a result of discussion with Bob Crothers. He
said that he know nothing about how to do that in C, but knows how to
do that in RPG. That was the clue. I've just set an exception handler
to monitor status message CPF5004. That does exactly the same job
But if you know both methods, you are free to select one, that is
more suitable for this or that case.
I see, that the method, you explained, is ideal for situation when
you output sets of information consisting of X lines and do not want
to break them between pages. Then you set overflow row X+1 rows
above the end of page and check for overflow only after the set is
Thank you very much, Simon.
IT Hooldusosakonna juhataja