Data visualization with SAS programming

reset result for print

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

reset result for print

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 


Accepted Solutions
Solution
‎08-08-2012 06:06 PM
Super Contributor
Posts: 273

Re: reset result for print

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


All Replies
Solution
‎08-08-2012 06:06 PM
Super Contributor
Posts: 273

Re: reset result for print

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

PROC Star
Posts: 7,437

Re: reset result for print

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

Contributor
Posts: 65

Re: reset result for print

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.

SAS Super FREQ
Posts: 3,637

Re: reset result for print

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

Super Contributor
Posts: 273

Re: reset result for print

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

Valued Guide
Posts: 2,177

Re: reset result for print

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

Super Contributor
Posts: 273

Re: reset result for print

Peter , you are right

Key + macro  = keyboard macro  with plenty of space!

Andre

typo   %sysfunc  in place of $sysfunc  of  course  sorry

New Contributor
Posts: 2

Re: reset result for print

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.

SAS Super FREQ
Posts: 8,820

Re: reset result for print

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

New Contributor
Posts: 2

Re: reset result for print

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!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 10 replies
  • 486 views
  • 3 likes
  • 7 in conversation