SAS provides three different options (TAB CSV DLM) for the DBMS= option on PROC IMPORT and PROC EXPORT that all read/write delimited files.
Does anyone know if there are any other differences? Is there really any reason to use on name instead of the other, other than defaulting the DELIMITER that is used?
Test program:
data class;
set sashelp.class (obs=3);
run;
filename csv temp;
filename dlm temp;
filename tab temp;
proc export data=class file=csv dbms=csv;
delimiter=',';
run;
proc export data=class file=dlm dbms=dlm;
delimiter=',';
run;
proc export data=class file=tab dbms=tab;
delimiter=',';
run;
data _null_;
infile csv ;
input;
list;
run;
data _null_;
infile dlm ;
input;
list;
run;
data _null_;
infile tab ;
input;
list;
run;
The main thing I see might be if you have a file named with a CSV extension that is not actually comma separated. Seems like we have more and more people using CSV for Character Separated. Without the correct DBMS and/or delimiter these might be a problem as it appears SAS would default to comma separated for import.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.