<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading raw data separated by delimiter in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293794#M61226</link>
    <description>&lt;P&gt;There should not be an issue with using spaces, because the comma is the delimiter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively you could use proc import instead:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Import the file;
proc import datafile = 'E:\SAS data\Data\base data set\lwprg1\sales.csv'
	out = sales
	replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Assuming you have headers for the columns in the first row. You might need to set guessingrows.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2016 18:34:49 GMT</pubDate>
    <dc:creator>CR204</dc:creator>
    <dc:date>2016-08-24T18:34:49Z</dc:date>
    <item>
      <title>Reading raw data separated by delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293789#M61225</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;While going through The Little SAS Book, it is mentioned that if we are reading raw data file using list input then in case of character data there shouldn't be any embedded space.&lt;/P&gt;&lt;P&gt;My question here is that &amp;nbsp;this limitation is applicable only when the delimiter is blank(default delimiter,In this case we have to use option dsd to read character data with embedded space).&lt;/P&gt;&lt;P&gt;I am having a data set where values in raw data file are comma seperated and in character data there is embedded space. But when i am trying to read the data with the following code,it is generating correct output.&lt;/P&gt;&lt;P&gt;data sales;&lt;BR /&gt;infile 'E:\SAS data\Data\base data set\lwprg1\sales.csv' dlm = ',';&lt;BR /&gt;length Job_Designation $ 20;&lt;BR /&gt;input ID First_Name $ Last_Name $ Gender $ Salary Job_Designation $ Country $&lt;BR /&gt;Birth_Date:Date9.&lt;BR /&gt;Hire_date:ddmmyy10.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Please let me know whether my understanding is correct or not and help me in clearing my confusion.&lt;/P&gt;&lt;P&gt;Attaching screenshot of sample raw data file(Embedded space data has been highlighted).&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12880iA1EE0DFDA7BE6C84/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="dataset.PNG" title="dataset.PNG" /&gt;</description>
      <pubDate>Wed, 24 Aug 2016 17:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293789#M61225</guid>
      <dc:creator>ashish_197</dc:creator>
      <dc:date>2016-08-24T17:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data separated by delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293794#M61226</link>
      <description>&lt;P&gt;There should not be an issue with using spaces, because the comma is the delimiter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively you could use proc import instead:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Import the file;
proc import datafile = 'E:\SAS data\Data\base data set\lwprg1\sales.csv'
	out = sales
	replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Assuming you have headers for the columns in the first row. You might need to set guessingrows.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 18:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293794#M61226</guid>
      <dc:creator>CR204</dc:creator>
      <dc:date>2016-08-24T18:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw data separated by delimiter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293835#M61235</link>
      <description>&lt;P&gt;However any delimited data does have a potential issue with embedded delimiter. Hence you see most applications that create commas separated files, csv, will put quotes around text with commas as part of a value (if the app doesn't do that for all character data). Which is where the SAS Infile option DSD comes into play.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 19:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-raw-data-separated-by-delimiter/m-p/293835#M61235</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-24T19:49:09Z</dc:date>
    </item>
  </channel>
</rss>

