>tks guys; it looks like i have to split the data in lots of 10k.
If you have to split it, I'd split it smaller than that; keep a running count of pages printed previously, and add that to the _PAGENO variable to give the current page number. Breaking it smaller (say at 1,000) avoids problems where you miscompute the number of pages for some part of the run; it's far less of a problem when you accidentally have two extra pages, bringing the page count to 1,002, than if you run over the 10,000 limit as a result.