05-01-2012 04:50 PM
I'm using EG 4.3 that resides on a server and using PROC IMPORT to read in an excel spreedsheet. Note that there is a space between the heading name 'Service Date'.
Here is my data in an excel spreadsheet:
Here is my code to read in the above excel spreadsheet:
proc import out=P01.datetest
where Service_Date >= '01MAR2012'd;
Here is the resulting error:
NOTE: The data set P01.DATETEST has 10 observations and 2 variables.
24 ! data P01.datetest_out;
25 set P01.datetest;
26 where Service_Date >= '01MAR2012'd;
ERROR: Variable Service_Date is not on file P01.DATETEST.
NOTE: The SAS System stopped processing this step because of errors.
2 The SAS System 09:30 Tuesday, May 1, 2012
WARNING: The data set P01.DATETEST_OUT may be incomplete. When this step was
stopped there were 0 observations and 2 variables.
WARNING: Data set P01.DATETEST_OUT was not replaced because this step was
NOTE: DATA statement used (Total process time):
real time 0.12 seconds
cpu time 0.00 seconds
It's my understanding that SAS replaces a SPACE with an underscore in column headings - is that correct?
Any ideas how to resolve with renaming the heading?
05-02-2012 01:14 AM
Did you open P01.datetest to see what variable names they are ?
use proc content check what variable name it truely contains .
Need further help from the community? Please ask a new question.