Hi, But the number of pages created originally might not be the same as the number of pages as when you do the replay, because you can alter the margins, for example, for one replay to be really, really big and then the number of pages might be different. As far as I know, you can't capture the number of pages directly. Although in the OLD days, before the {thispage} and {lastpage} functions, you had to output to a postscript file and then read the postscript file with a program to grab the number of pages. Not a pretty process. I think of the object as being "self-contained" and instead of printing the last "n" pages, I would look at some of the controls that let you use WHERE processing to select BY groups or by labels for example -- you could select the last BY group to replay. See the WHERE option for the REPLY statement with PROC DOCUMENT: SAS(R) 9.4 Output Delivery System: User's Guide, Second Edition cynthia
... View more