BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
issac
Fluorite | Level 6

Hi folks;

I am working with 9.3 version. Every time I use proc print, in the results tab, it shows all my previous printed output also but I do need only the last work. How can I fix this?

Thanks!

Issac 

1 ACCEPTED SOLUTION

Accepted Solutions
Andre
Obsidian | Level 7

By default you are under html destination

and probably reading your output in the result viewer so you see a big html file growing

so until you don't submit the following, you wil  remain in that situation

ods html close;

ods preferences;

and eventually reopen a new html file

with ods html;

with then a new html file in your current directory

but if you type

ods html path="%sysfunc(pathname (work) ) ";

the second html file will well go inside the work directory

the advantage is that when you are trying graphics a lot all the png files are scratched at the end of the sas session

I too at the beginning was disturb by the new ods destination but if you are in a test phase it is usefull.

Please read more from contributions on this topic from the global forum 2012 a long illustrated text of Cynthia

or from the sas help  as you were advertised at the start of 9.3  that the rules were changing.

paper 250-2012 "Where's the listing Windows: using the new results viewer in sas 9.3"

support.sas.com/resources/papers/proceedings12/250-2012.pdf

Andre

View solution in original post

10 REPLIES 10
Andre
Obsidian | Level 7

By default you are under html destination

and probably reading your output in the result viewer so you see a big html file growing

so until you don't submit the following, you wil  remain in that situation

ods html close;

ods preferences;

and eventually reopen a new html file

with ods html;

with then a new html file in your current directory

but if you type

ods html path="%sysfunc(pathname (work) ) ";

the second html file will well go inside the work directory

the advantage is that when you are trying graphics a lot all the png files are scratched at the end of the sas session

I too at the beginning was disturb by the new ods destination but if you are in a test phase it is usefull.

Please read more from contributions on this topic from the global forum 2012 a long illustrated text of Cynthia

or from the sas help  as you were advertised at the start of 9.3  that the rules were changing.

paper 250-2012 "Where's the listing Windows: using the new results viewer in sas 9.3"

support.sas.com/resources/papers/proceedings12/250-2012.pdf

Andre

art297
Opal | Level 21

Of course, you can always go to tools->options->preferences->results and simply turn listing back on and html off.

issac
Fluorite | Level 6

Thank you both Andre and Arthur.

It seems that we should turn off ods html and reset it by null command "ods html;" to get the new results in a blank empty result viewer. Isn't that sound weird? I hope there is another simple way to get it done.

Rick_SAS
SAS Super FREQ

See the discussion and examples in the article "How to clear the output window in SAS 9.3"

Andre
Obsidian | Level 7

gsub'ods html close;ods preferences;ods html path="$sysfunc(pathname(WORK))";'

is just at the limit of what a ctrl + G  by example can accept

BE AWARE  that i tried without blank   gsub'  and no blank if it is  not necessary

then one action and you are  in a new  refreshed context

BUT ALWAYS writing  in your work  (and not in your current directory)

a second or third sashtmln.htm  file

May i conclude with a wish for the ballot  that the length of the key buffer must be longer

Andre

Peter_C
Rhodochrosite | Level 12

Andre

while waiting for the larger key buffer suggestion to be implemented, you might like a work-around. In command line context like these GSUB strings, you can use the macro language. Place all the text needed in a macro and try it out. (I would but they haven't implemented base SAS4iPhone (yet) so only later can I check on a proper machine ;-))

SAS/AF would enable commands to be packaged too, and with a lot more flexibility. Some of the built-in explorer actions have been packaged as SCL modules.

Peter

Andre
Obsidian | Level 7

Peter , you are right

Key + macro  = keyboard macro  with plenty of space!

Andre

typo   %sysfunc  in place of $sysfunc  of  course  sorry

LittleDumbDoctor
Calcite | Level 5

My co-worker Shelly ask the same question a couple of month ago. This html issue is new in 9.3.

Actually, There seems a simpler solution:

ods html newfile=proc; run;

Then everytime you will have a separate new html file output, not including the previous output.

Hopefully it helps.

Cynthia_sas
SAS Super FREQ

Hi:

  The only downside of newfile=proc approach is that if you have 3 procedures:

proc report (1)

proc freq(2)

proc tabulate(3)

...and you want all 3 outputs in one HTML file, then NEWFILE=PROC is NOT what you want and you might want to consider using what I call the "full control" method.

  I outlined some of those choices and syntax examples in my SGF paper:

http://support.sas.com/resources/papers/proceedings12/250-2012.pdf

cynthia

LittleDumbDoctor
Calcite | Level 5

Hi Cynthia,

I agree what you just mentioned.

But the key is, the simpler, the better.  my answer did solve Issac's problem in a relative easier way, right?

Also, we don't know if Issac use those 3 procedures together and want them in one output, right?

btw: that's a good paper!

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 10 replies
  • 2649 views
  • 3 likes
  • 7 in conversation