BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi

I am using proc report code to generate my report output as Txt file.
I am not able to display page number in the footnote like
page 1
It is being displayed on the topmost right hand corner as 1 since i have given in options line number but I dont want it that way.

Can you suggest me any solution.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
This is standard LISTING destination/OUTPUT window/TXT file behavior. The SAS page number ALWAYS goes in the upper right-hand corner of the page, unless you are using ODS RTF or ODS PDF -- in which case, you can put the page number on the bottom of the page using a FOOTNOTE statement. However, the technique that works for RTF and PDF does NOT work when you create an ASCII text file (LISTING destination).

If you use DATA _NULL_ programming for LISTING, then you could take control of the ENTIRE page and calculate the page numbers yourself. Then you could put the page number on the bottom of the page. In order for you to issue the correct "page eject" instruction, you would have to count EVERY line that you wrote to the page -- which means that you would be responsible for placing every piece of output on the page using PUT statements (instead of using the regular SAS procedure syntax).

For more information about DATA _NULL_ programming, consult the SAS documentation for FILE PRINT, LINESLEFT, N=PS, HEADER=, PUT _PAGE_ and the PUT statement with pointer control (PUT @10 name @40 salary;).

(However, just a note, if you intend to turn this program with hardcoded pagesize/linesize and pagenumbers into a stored process, you will probably NOT get the results you expect. It is hard to have LISTING type output with LISTING style page breaks (essentially carriage control characters) honored by a browser or by most laser/deskjet printers. I'm adding this caveat based on your other post about not getting stored process output printed the way you want. DATA _NULL_ with PUT _PAGE_ may not work the way you expect inside a stored process either.)

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1677 views
  • 0 likes
  • 2 in conversation