DATA Step, Macro, Functions and more

PROC PRINT takes .2 seconds to run but several minutes to display!

Reply
Contributor
Posts: 25

PROC PRINT takes .2 seconds to run but several minutes to display!

Windows 7 - up to date.

SAS 9.4.1

 

I run a simple Proc Print and it can take several minutes to display the output.  I check the log and it reports it took 0.2 seconds.

"running" in the window title bars is not there.

 

Replaced the video card and drivers in the Dell computer.  Other apps seem to work okay.

 

I  watch the app via Task Manger SAS is quite busy reading/writing.

 

What should take a split second is draging out for many minutes.

 

related: in the program window, I'll be typing and the screen locks up.  what I type will get entered but who knows what or where.  Scrolling up and down in output window works some times and not others.  I have to toggle between pgm, log and output windows to get it to "wake up".

 

So why does SAS freeze up and not other apps if the hardware / driver is faulty?

 

 

 

 

Community Manager
Posts: 2,761

Re: PROC PRINT takes .2 seconds to run but several minutes to display!

What ODS destination?  PDF, HTML, RTF, just listing (text)?  And what is the file size of the output?

Contributor
Posts: 25

Re: PROC PRINT takes .2 seconds to run but several minutes to display!

text to the output window.

 

Number of obs doesn't seem to matter.  currenly 11,000.

 

Tried using BY or not.

Tried WIDTH=MINIMUM to reduce lines in the output (by reducing multi-line output).

 

4 million obs works in the same program earlier on.

 

Contributor
Posts: 25

Re: PROC PRINT takes .2 seconds to run but several minutes to display!

Oh yeah, CTRL-BREAK doesn't do anything because the proc print only took a split second. There is no running procedure to halt.

SAS menus won't respond.  the cursor is an hourglass.  I can click on the different windows to make them active but that's about it.

 

Contributor
Posts: 25

Re: PROC PRINT takes .2 seconds to run but several minutes to display!

yeah, It took me about 2 minutes to change the output setting back to "listing" after each upgrade.  9.2 to 9.3 to 9.4

ODS takes far too much screen space in its effort to make things look nice.  I don't publish so appearance doesn't matter.

And html is typically so bulky (expecially micro$oft generated html).

 

I routinely use proc print as an additional debuging tool to look at data to make sure my programs do what I want them to do vs SAS doing what I tell it to do.  I don't print such output to paper. Once the program is working okay, I comment out those proc print commands.

 

 

 

 

 

Super User
Posts: 6,938

Re: PROC PRINT takes .2 seconds to run but several minutes to display!

When you view a dataset with the viewer, only the necssary obs are fetched from the server for display. When you use any output procedure, the whole output is transferred to EG before it starts displaying and becomes responsive again.

I suggest to either look at datasets directly, or use the obs= dataset option in proc print to reduce the output to a reasonable size.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 17,831

Re: PROC PRINT takes .2 seconds to run but several minutes to display!

@ChrisHemedinger question was, Is your OUTPUT window HTML or Listing? 

 

As of 9.2 the default was ODS Listing, which is more of a text file and is super quick. 

As of 9.3 the default is HTML and it's slower and there's more overhead in creating an HTML file. 

 

Try switching back to Listing and see if that helps. I'm not sure what you're going to do with printing 4 million or even 11,000 records but good luck!

 

You change the default output in Preferences. Or you could via code.

 

 

ods listing;
ods html close;
Ask a Question
Discussion stats
  • 6 replies
  • 159 views
  • 2 likes
  • 4 in conversation