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