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-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!

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.

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
  • 1 reply
  • 1450 views
  • 0 likes
  • 2 in conversation