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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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