%let DorsHHFPath =/dorsshare/HHFit;
%put &DorsHHFPath;
proc import out= al_
datafile="&DorsHHFPath/al/*.csv"
dbms=CSV replace ;
getnames=no;
datarow=3;
run;
proc import out= ga
datafile="&DorsHHFPath/ga/*.csv"
dbms=CSV replace ;
getnames=no;
datarow=3;
run;
The results are two datasets by state with the following:
var1 var2 var3
State Company Date
Al MyCompany 1/23/18
Al MyComapny 1/31/18
A similar dataset for GA. I do a separate proc import for each state (15 in all)
1.I have to use a rename for all of the vars (ie rename var1 = State)
2. In addition, Date imports as a character. Can I define it as a date9. in the initial proc import statement? Also is there a way to define the other vars based on the names directly under it (ie var2 = company)
3. In each row, the state will repeat itself depending on the number of entries for that state. Is there a way to only bring in data and say delete the row if var1(state) does not equal the state I choose (ie AL)?