Help using Base SAS procedures

Proc Print Hangs

Reply
N/A
Posts: 0

Proc Print Hangs

I have been importing data from a MySQL database, cleaning it up, formatting, etc. for a weekly update into a Master.SASDataset. However, when I want to review the data prior to the update by using a Proc Print statement, I receive one page of output and the program hangs. I cannot review the entire output.

Below is copy of the SAS log, including the code just prior to the Proc Print statement.


3413 Proc Sort data=SQLTimeSched;
3414 by ID ;
3415 Run;

NOTE: There were 214 observations read from the data set WORK.SQLTIMESCHED.
NOTE: The data set WORK.SQLTIMESCHED has 214 observations and 11 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


3416 Proc Print data=SQLTimeSched n;
3417 var ID Testdate Tester Type Appoint HR LID;
3418
3419 run;

ERROR: User asked for termination
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 73 observations read from the data set WORK.SQLTIMESCHED.
NOTE: PROCEDURE PRINT used (Total process time):
real time 6.59 seconds
cpu time 0.20 seconds


You can see I finally halt the Proc Print at the Error statement, but that was after three minutes of waiting for an output of 214 obs and 11 variables.

Any ideas? I am sure it is something simple. I just don't know what I am looking for.

Any help or suggestions would be appreciated.

Thanks,

Scot
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Print Hangs

You will need to share more about the SAS code executing before what you've provided - there could be some open ODS destination, possibly. Also, set OBS=0 upfront in your code to determine if the behavior changes. Also, SAS version and OS environment, also with SAS processing (local install, remote server) conditions would be most helpful.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Proc Print Hangs

sbb, thanks for your time.

No ODS.

SAS 9.1.3 SP4 XP processing local

however, the data is pulled from Linux server.

when I add the obs=5 option the procedure runs fine.
PROC Star
Posts: 1,561

Re: Proc Print Hangs

If you add obs=213, all works fine and obs=215 makes the procedure hang? If so, proc print encounters some data it dislikes.
In that case:
- look at the data (try using the var statement in proc print to seek the bad variable, or use table viewer, or a data step and the rank function to see actual binary values)
- clean the data up so you can keep working
- inform tech support, I am sure they'd be keen to know and make sas more robust
Ask a Question
Discussion stats
  • 3 replies
  • 209 views
  • 0 likes
  • 3 in conversation