BookmarkSubscribeRSS Feed
Jishu
Calcite | Level 5
Extra lines are coming in Page Number when output is routed to a file using PRINTTO.I am trying to write the report in SASLOG into a file. The report is having 3 different layouts and one variable is there for page number. First layout ends at page number 749. Second layout is having 7 pages. Third layout starts at page number 757(749 + 7) in SASLOG but in report page number for third layout is 771. Not sure from where these extra lines are coming in output file.please help om how to correct the page number in file.
5 REPLIES 5
LaurieF
Barite | Level 11

Without seeing your code, it's hard to tell. It may just be that all the stuff that comes before in the log takes up seven pages.

 

You can reset the page number to anything you like - try this just before the first layout:

option pageno=1;
Jishu
Calcite | Level 5
I can understand that PRINTTO is playing some trick.The page number(749 + 7 = 756. So next line should be 757 which is coming in SASLOG) is correctly calculated When the report is getting written into SASLOG by using PROC PRINT but when I am trying to route the same report to an external flat file by using PRINTTO , then the page number(It should be 757 but its coming as 771) is not coming correctly.

Please suggest why these extra lines(771 - 756=15) are coming in external file and how to suppress these lines and write correct page number(757).
Tom
Super User Tom
Super User

Are you comparing the page numbers generated in the SAS LOG to the page numbers generated in the LST output? They are separate output locations with their own page counters.

Jishu
Calcite | Level 5
There is a varible PG_NO which is calculating the page number for first and second layout. The same varible is not there in third layout. Still third lyout is printing the page number.
First and second layout is having total 756 pages. So the third layout should start from page 757. It is starting in page 757 in SASLOG but when i am routing the same report to an external file using PROC PRINTTO the third layout is starting from page number 771. I am confused from where these extra lines are coming. Please help.
ballardw
Super User

Post code and the program log.

 

If you test with smaller data sets such that only 2 pages are created for the first two groups do you still have a similar behavior for a the third? If so post dummy data that will generate the type of output you describe with small enough data we can examine. (I really am not interested in trying to wade through 700+ pages).

 

 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 868 views
  • 0 likes
  • 4 in conversation