If you have any way to calculate the length of each record, write some commands (perhaps, a loop), to group by page number.
lnPageNo = 1
lnLineNo = 1
scan
lnLineNo = lnLineNo + NumberOfLines
if lnLineNo >= 60
lnLineNo = 1
lnPageNo = lnPageNo + 1
endif
replace PageNumber with lnPageNo
endscan
HTH, Hilmar.
>Hi, thanks for reply.
>I don't understand how apply what you say.
>
>I don't know with anticipation the length for a record.
>
>Supouse that I have 10 lines for page
>
>The first record use 3 lines, if the second record use 7 or less, then print in the same page, else print in the next page
>
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)