BookmarkSubscribeRSS Feed
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.
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;
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).
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.

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.
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).





Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.


Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 


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
  • 4 in conversation