<?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 input, variables with different lengths and column starts in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8063#M206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have some data that looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order, businessname&lt;/P&gt;&lt;P&gt;1234,Acme&lt;/P&gt;&lt;P&gt;432,Bizarro&lt;/P&gt;&lt;P&gt;55689,Ralph's party town&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the title I mentioned that the variables have different lengths and column starts.&amp;nbsp; By this I mean that the order numbers have different numbers of characters for each order and that the businessname observations start at different column positions.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started my infile with a data step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data order;&lt;/P&gt;&lt;P&gt;infile 'location.csv' dlm=',' firstobs=2;&lt;/P&gt;&lt;P&gt;input order businessname $;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS infiles the first 8 characters of businessname but I am demanding and want the whole enchilada.&amp;nbsp; If I knew the start column of businessname I would try to grab a field corresponding to businessname, i.e. something like $ 7-26 (Ralph's party town).&amp;nbsp; The problem is that the Acme observation starts at column 6, Ralph's at column 7 and Bizarro at 5.&amp;nbsp; How can I code an input statement for the businessname observations to flexibly accomdate this yet also grab all the characters in each observation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Feb 2012 20:03:07 GMT</pubDate>
    <dc:creator>jdub</dc:creator>
    <dc:date>2012-02-20T20:03:07Z</dc:date>
    <item>
      <title>input, variables with different lengths and column starts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8063#M206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have some data that looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order, businessname&lt;/P&gt;&lt;P&gt;1234,Acme&lt;/P&gt;&lt;P&gt;432,Bizarro&lt;/P&gt;&lt;P&gt;55689,Ralph's party town&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the title I mentioned that the variables have different lengths and column starts.&amp;nbsp; By this I mean that the order numbers have different numbers of characters for each order and that the businessname observations start at different column positions.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started my infile with a data step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data order;&lt;/P&gt;&lt;P&gt;infile 'location.csv' dlm=',' firstobs=2;&lt;/P&gt;&lt;P&gt;input order businessname $;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS infiles the first 8 characters of businessname but I am demanding and want the whole enchilada.&amp;nbsp; If I knew the start column of businessname I would try to grab a field corresponding to businessname, i.e. something like $ 7-26 (Ralph's party town).&amp;nbsp; The problem is that the Acme observation starts at column 6, Ralph's at column 7 and Bizarro at 5.&amp;nbsp; How can I code an input statement for the businessname observations to flexibly accomdate this yet also grab all the characters in each observation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 20:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8063#M206</guid>
      <dc:creator>jdub</dc:creator>
      <dc:date>2012-02-20T20:03:07Z</dc:date>
    </item>
    <item>
      <title>input, variables with different lengths and column starts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8064#M207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data order;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'location.csv' dlm=',' firstobs=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat businessname $50.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input order businessname;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 20:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8064#M207</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-20T20:08:43Z</dc:date>
    </item>
    <item>
      <title>input, variables with different lengths and column starts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8065#M208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 20:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/input-variables-with-different-lengths-and-column-starts/m-p/8065#M208</guid>
      <dc:creator>jdub</dc:creator>
      <dc:date>2012-02-20T20:15:10Z</dc:date>
    </item>
  </channel>
</rss>

