BookmarkSubscribeRSS Feed
Calcite | Level 5

Please help me to read in data with comma as delimiter.

Issue is we are having comma's in the values for the variables and hence that whole value should be with same variable after read out using comma as file delimiter.

Lapis Lazuli | Level 10
Are the values quoted as well?
Calcite | Level 5
Nope that was the issue. Vendor just sent data as a csv file with comma as delimiter. And I see there are commas in few of the field values within.

Lapis Lazuli | Level 10
I have no idea how to help...sorry.
Opal | Level 21
Can you post a copy of one record? Particularly, one record that has the extra commas, along with the header record (or at least an indication of what the fields are?

Super User
If you are looking at the file using Excel, or other spreadsheet program, I recommend looking at it using a text editor such as the SAS editor or Wordpad, or a viewer such as SAS FSLIST.

If you are seeing commas in the fields the quotes that are in the file are ignored by most of the programs that open CSV by default.
Rhodochrosite | Level 12
You probably need to go back to your vendor and get them to provide you with a new dataset that is either properly set out as a .csv file or to substitute another delimiter [tilde (~) and pipe (|) are pretty good choices and you an look for them in this copy of the file].

Doc Muhlbaier
Super User
Yes.I do not think it is a big problem,since SAS has very powerful of processing these data.
Could you post some dummy data and Explain what output do you want?

Fluorite | Level 6

If your vendor is giving you a scheme about what he's delivering then you should know the columns who have a comma type value.
When you know your columns you have two possibilities : concat first column with a comma and your second column and input(concatenated_column,commax10.3);

more tricky is if you know your second column contains hundreds for example then just tell sas value=column1+(column2/100);
Calcite | Level 5
If your incoming data has commas as part of the data, modified list input might be useful. Here is a link from, scroll down until you read the Modified List Input section,


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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 9 replies
  • 8 in conversation