<?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: how to read thidsdata in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-thidsdata/m-p/18006#M2656</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I assume that you want your program to read the 4th field. &lt;BR /&gt;
&lt;BR /&gt;
Since your data has two delimiters side by side, you need to introduce sensitivity to the program.&lt;BR /&gt;
&lt;BR /&gt;
Introducing "DSD" will read that "missing" field.&lt;BR /&gt;
&lt;BR /&gt;
== Start of code==;&lt;BR /&gt;
data one;&lt;BR /&gt;
input num1 text1 $ text2 $ text3 $ num2; &lt;BR /&gt;
infile cards dsd dlm=',';&lt;BR /&gt;
cards;&lt;BR /&gt;
240,W,Ginger,,120&lt;BR /&gt;
240,W,Protea,,180&lt;BR /&gt;
356,W,Heliconia,,60&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print;&lt;BR /&gt;
run;&lt;BR /&gt;
== End of code==;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks...</description>
    <pubDate>Tue, 14 Apr 2009 09:26:03 GMT</pubDate>
    <dc:creator>msg</dc:creator>
    <dc:date>2009-04-14T09:26:03Z</dc:date>
    <item>
      <title>how to read thidsdata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-thidsdata/m-p/18005#M2655</link>
      <description>I have text data delimited by comma as below&lt;BR /&gt;
&lt;BR /&gt;
240,W,Ginger,,120&lt;BR /&gt;
240,W,Protea,,180&lt;BR /&gt;
356,W,Heliconia,,60&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
DATA A;&lt;BR /&gt;
INFILE "d:\sas_data\data\testfile.csv" dlm = ',' missover ;&lt;BR /&gt;
INPUT VAR1  VAR2 $ VAR3 $ VAR4 VAR5;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
       result&lt;BR /&gt;
                        240     W      Ginger        120      .&lt;BR /&gt;
                      240     W      Protea       180      .&lt;BR /&gt;
                      356     W      Heliconi      60      . &lt;BR /&gt;
&lt;BR /&gt;
the problem is sas doesn't read the 4th field (,,) between Ginger and 120 &lt;BR /&gt;
if i want to sas read it (not skip) and sas doesnt go to the new line when it is end of each record (after 120 it shoud go to new line), how can i do ?&lt;BR /&gt;
thank in advance</description>
      <pubDate>Tue, 14 Apr 2009 03:00:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-thidsdata/m-p/18005#M2655</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-14T03:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to read thidsdata</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-thidsdata/m-p/18006#M2656</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I assume that you want your program to read the 4th field. &lt;BR /&gt;
&lt;BR /&gt;
Since your data has two delimiters side by side, you need to introduce sensitivity to the program.&lt;BR /&gt;
&lt;BR /&gt;
Introducing "DSD" will read that "missing" field.&lt;BR /&gt;
&lt;BR /&gt;
== Start of code==;&lt;BR /&gt;
data one;&lt;BR /&gt;
input num1 text1 $ text2 $ text3 $ num2; &lt;BR /&gt;
infile cards dsd dlm=',';&lt;BR /&gt;
cards;&lt;BR /&gt;
240,W,Ginger,,120&lt;BR /&gt;
240,W,Protea,,180&lt;BR /&gt;
356,W,Heliconia,,60&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print;&lt;BR /&gt;
run;&lt;BR /&gt;
== End of code==;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks...</description>
      <pubDate>Tue, 14 Apr 2009 09:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-thidsdata/m-p/18006#M2656</guid>
      <dc:creator>msg</dc:creator>
      <dc:date>2009-04-14T09:26:03Z</dc:date>
    </item>
  </channel>
</rss>

