<?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: read raw data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475539#M122295</link>
    <description>&lt;P&gt;You are using a comma both as a delimiter and as a digit separator in your data. Not a good idea. You could do something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
INFILE DATALINES dlm='|';
input Make : $9. Invoice : comma6.3;
datalines;
BMW|33,890
Chevrolet|17,234
Ford|14,482
Infinity|27,536
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Jul 2018 07:55:31 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-07-05T07:55:31Z</dc:date>
    <item>
      <title>read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475535#M122294</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
INFILE DATALINES dlm=',';
input Make : $9. Invoice : comma6.;
datalines;
BMW,35,681
Chevrolet,28,197
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Why I can't read Invoice correctly? What's wrong?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475535#M122294</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2018-07-05T08:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475539#M122295</link>
      <description>&lt;P&gt;You are using a comma both as a delimiter and as a digit separator in your data. Not a good idea. You could do something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
INFILE DATALINES dlm='|';
input Make : $9. Invoice : comma6.3;
datalines;
BMW|33,890
Chevrolet|17,234
Ford|14,482
Infinity|27,536
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jul 2018 07:55:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475539#M122295</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-05T07:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475540#M122296</link>
      <description>&lt;P&gt;It contains a delimiter. Delimiters take precedence over commas used as a decimal point.&lt;/P&gt;
&lt;P&gt;Use a different delimiter or "mask" the commas with quotes and the dsd option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
INFILE DATALINES dlm=',' dsd;
input Make : $9. Invoice : comma6.;
datalines;
BMW,"33,890"
Chevrolet,"17,234"
Ford,"14,482"
Infinity,"27,536"
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475540#M122296</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-05T08:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475541#M122297</link>
      <description>&lt;P&gt;You want to say, that i cannot read a raw data as i wrote?&lt;/P&gt;&lt;P&gt;Why i ask, because i saw a lot of palces, where they write it as me, but it doen't work.&lt;/P&gt;&lt;P&gt;for example, &lt;A href="https://onlinecourses.science.psu.edu/stat481/node/60/" target="_blank"&gt;https://onlinecourses.science.psu.edu/stat481/node/60/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:16:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475541#M122297</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2018-07-05T08:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475543#M122299</link>
      <description>&lt;P&gt;In that example page, they &lt;EM&gt;never&lt;/EM&gt; use a comma as delimiter.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475543#M122299</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-05T08:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475545#M122300</link>
      <description>&lt;P&gt;you are right, excuse me&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475545#M122300</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2018-07-05T08:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: read raw data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475609#M122315</link>
      <description>&lt;P&gt;If the field with the embedded delimiter is the last one in the line then just read that field using formatted input instead of list mode input.&amp;nbsp; Just remove the colon modifier before the format specification in the INPUT statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
  INFILE DATALINES dlm=',' dsd truncover;
  input Make  :$9. Invoice comma6.;
datalines;
BMW,35,681
Chevrolet,28,197
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the field is in the middle of the line then you will need to work harder to figure out which parts belong to which fields.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 13:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-raw-data/m-p/475609#M122315</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-05T13:14:39Z</dc:date>
    </item>
  </channel>
</rss>

