BookmarkSubscribeRSS Feed
Tom
Super User Tom
Super User

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; 
1 REPLY 1
ballardw
Super User

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 449 views
  • 0 likes
  • 2 in conversation