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