BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have been using code similar to this:

ods escapechar='!';
footnote1 j=r "Page !{thispage} of !{lastpage}";

..for sometime now to produce 'page x of y' in the footer of my Proc Report ods -> PDF output. I believe that I have run up against a limit in using this method related to the {lastpage} tag. If the output is >500 pages, the program seems to hang using ever greater amounts of memory. A program that would normally take less that a minute to complete without the {lastpage} tag in the footnote runs for at least 15 minutes (I lose patience and kill the job at this point). I have only experienced this with output > 500 pgs. It seems to be due only to the {lastpage} tag -- changing the footnote to:

footnote1 j=r "Page !{thispage}";

..brings the execution time back to under a minute even for 800+ pages. I have tried a custom style template with page x of y defined in the PageNo section (see SUGI paper 132-30 by Lauren Haworth):

Style PageNo from TitlesAndFooters
"Controls page x of y in the footer" /
font = fonts("TitleFont2")
cellpadding = 0
cellspacing = 0
pretext = "Page "
posttext = " of !{lastpage}"
just=r
vjust=b;

..with the same effect. Has anyone else encountered this problem, or better yet, know of a work around?

Thanks.
2 REPLIES 2
ScottH_SAS
SAS Employee
David,

I'm wondering if you are hitting a memory limit on your machine. Is it possible to share your data with me so I could run it here.

Email me at ODS@sas.com

Thanks!
Scott
deleted_user
Not applicable
Hi Scott,

Unfortunately I don't think that I can share the data without getting releases and such. I can tell you that the dataset that Proc Report was working on had 2698 obs and that because of wrapping on various text columns in the report I would typically get 4-5 obs per page. I don't know if that is enough to go on. I think that my pc is relatively robust -- it has 2GB of memory and an quad processor and I do not typically have a lot of other apps running. I watched the memory usage while the job was running and while the memory kept climbing slowly when I gave up on the job it had reached the 100MB range with about 25% CPU. One other piece of information is that after terminating the SAS process the PDF file created had approx 400 of 600+ pages written but was 500MB in size. If I took out the {lastpage} tag from the footnote all 600+ pages would write in less than 1 minute and the file size was 5MB. Let me know if this is helpful.

Thanks.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 998 views
  • 0 likes
  • 2 in conversation