Hi,
I don't understand why SAS road variable in list does not match type prescribeb for this list.
It's all numeric data, but when i look in the librairy some data are in alphanum.. how can i change this ?
In SAS, my data rc1 isnumeric, but not my other data like bg1
Is't because i have 0 and . in my folder ?
THanks and sorry for my english
How did you make the data set?
SAS is not going to convert the types of your variables, it will just do what you ask. Now if you tried to use PROC IMPORT to have SAS guess about what type of data you have in a CSV or EXCEL file then you might end up with some variables being defined as character. It is better to write your own program to read the data and then you have control over how the variables are defined.
My data are all numeric (see my data in excel on the bottom), but when I put it in SAS university, SAS read the data bq1 bq2 bq3 bgm1 bgm2 bgm3 as alphanum. Why ?
Your numbers are left aligned, typically numbers are right aligned. I'm guessing that Excel has the cells formatted as text and SAS is assuming those formats. Try right aligning number and setting to numbers in Excel before import and see if that helps the import.
in your first image Obs 13 has a period "." or rather a "Missing" value. check to see what value is in the input file. You may have an "O" (letter O) not a "0" number zero.
William E Benjamin Jr
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.