<?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 how to read in file with number of columns that is different every time? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55171#M11749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; One Clarification.Var1-Var2 are two variables whcihis being used to lookup RF01. when file has 5 columns , we need to use four vairbales to look up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any example to explain this would be helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Apr 2012 08:52:07 GMT</pubDate>
    <dc:creator>manojinpec</dc:creator>
    <dc:date>2012-04-04T08:52:07Z</dc:date>
    <item>
      <title>how to read in file with number of columns that is different every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55170#M11748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to write SAS code that can read in csv file every time it is read, number of columns maybe different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, I need to use different variables to look up different values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let's say first time I have 3 columns, it's a look up table, use var1 - var2 to look up RF01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next time when I read in the file, it has 5 columns, use var1 - var3 to look up RF01 and RF02&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, given this situation, the column number is not fixed, and also look up column value is different too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 03:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55170#M11748</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-04-04T03:32:18Z</dc:date>
    </item>
    <item>
      <title>how to read in file with number of columns that is different every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55171#M11749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; One Clarification.Var1-Var2 are two variables whcihis being used to lookup RF01. when file has 5 columns , we need to use four vairbales to look up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any example to explain this would be helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 08:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55171#M11749</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-04-04T08:52:07Z</dc:date>
    </item>
    <item>
      <title>how to read in file with number of columns that is different every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55172#M11750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st time, table is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 var2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RF01&lt;/P&gt;&lt;P&gt;us&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IR&lt;/P&gt;&lt;P&gt;eu&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tech&amp;nbsp;&amp;nbsp;&amp;nbsp; FX&lt;/P&gt;&lt;P&gt;ca&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; svc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sprd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd time, table is like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 var2&amp;nbsp;&amp;nbsp; var3&amp;nbsp;&amp;nbsp;&amp;nbsp; RF01&amp;nbsp;&amp;nbsp; RF02&lt;/P&gt;&lt;P&gt;us&amp;nbsp;&amp;nbsp;&amp;nbsp; fin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; swp&amp;nbsp;&amp;nbsp;&amp;nbsp; crv01&amp;nbsp;&amp;nbsp;&amp;nbsp; FX&lt;/P&gt;&lt;P&gt;eu&amp;nbsp;&amp;nbsp;&amp;nbsp; corp&amp;nbsp; sptn&amp;nbsp;&amp;nbsp; crv02&amp;nbsp;&amp;nbsp;&amp;nbsp; sprd&lt;/P&gt;&lt;P&gt;gb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bnk&amp;nbsp; edotn&amp;nbsp; crv04&amp;nbsp;&amp;nbsp; ir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 14:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55172#M11750</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-04-04T14:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to read in file with number of columns that is different every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55173#M11751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not use proc import to import csv file.&lt;/P&gt;&lt;P&gt;but about your querying. I don't know which criterion you used to judge variable should be var: or RF: ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 11:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55173#M11751</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-04-06T11:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to read in file with number of columns that is different every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55174#M11752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will different iterations of this process also add any rows to your data?&lt;/P&gt;&lt;P&gt;I think the PROC IMPORT solution Ksharp mentioned is a good start but if you have rows added to your data there may be an issue with a variable column changing data types from numeric to string based on the content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the first time you read the data with column 10 the values are numeric. Then in a later version added rows in column 10 now contain some text values. Proc import is likely to make that variable string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 14:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-read-in-file-with-number-of-columns-that-is-different/m-p/55174#M11752</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-04-06T14:38:29Z</dc:date>
    </item>
  </channel>
</rss>

