I'm trying to import some data from a .txt file into WPS (which works with SAS language). Everythings worked perfectly until I realized that for one column/variable, some of my observations were cut. For example in the column/variable Type, my 5 first observations in the original file were:
RAN
FG
MAJOFG
ARBA
ARBV
but in my data set in sas, here's the data I get:
RAN
FG
MAJ
ARB
ARB
So I thought about using a format during the import to make sas always take the $8. format. Can it work with proc import? Here is my code:
proc import out = sasuser.frais
datafile="~/NAS/M/XXX.txt"
dbms=dlm replace;
delimiter=";";
getnames=yes;
datarow=2;
run;
I also tried to use data infile but for some reason it moves my lines of data (the beginning of the second line starts at the end of the first one, probably because most of the time my last 4 columns/variables are empty). And I have more than 20 variables, most of which are properly imported by sas (in terms of format I mean), so if I could avoid naming a format for each of them, it would be great!