<?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: SAS default length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98190#M290613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The length of new variable "city" was set by "London".&amp;nbsp; using "otherwise" because destination may have values other than "LHR" and "CPH".&lt;/P&gt;&lt;P&gt;try adding a length statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.flights;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length city $ 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destination = 'CPH';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select(destination);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when('LHR') city = 'London';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when('CPH') city ='Copenhagen';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2012 20:32:37 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-10-17T20:32:37Z</dc:date>
    <item>
      <title>SAS default length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98188#M290611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a SAS BASE certification exam sample question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following SAS program is submitted:&lt;/P&gt;&lt;P&gt;data work.flights;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destination = 'CPH';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select(destination);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when('LHR') city = 'London';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when('CPH') city ='Copenhagen';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which of the following is the value of the CITY variable?&lt;/P&gt;&lt;P&gt;A. London&lt;/P&gt;&lt;P&gt;B. Copenh&lt;/P&gt;&lt;P&gt;C. Copenhagen&lt;/P&gt;&lt;P&gt;D. ' ' (missing char value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why is the answer B not C? also, within the Select statement, what is the function of 'otherwise'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98188#M290611</guid>
      <dc:creator>Davidliu494</dc:creator>
      <dc:date>2012-10-17T20:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS default length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98189#M290612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nvm... it's because variable CITY took the length of the first instance of the variable, which is 'London'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98189#M290612</guid>
      <dc:creator>Davidliu494</dc:creator>
      <dc:date>2012-10-17T20:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS default length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98190#M290613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The length of new variable "city" was set by "London".&amp;nbsp; using "otherwise" because destination may have values other than "LHR" and "CPH".&lt;/P&gt;&lt;P&gt;try adding a length statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.flights;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length city $ 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destination = 'CPH';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select(destination);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when('LHR') city = 'London';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when('CPH') city ='Copenhagen';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98190#M290613</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-10-17T20:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS default length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98191#M290614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Otherwise is where it branches when none of the other conditions are met.&amp;nbsp; In this case it does nothing.&amp;nbsp; You can cause run-time errors if you forget to include the otherwise category and your actual data fails to match one of the other conditions.&amp;nbsp; Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #ff0000;"&gt;ERROR: Unsatisfied WHEN clause and no OTHERWISE clause at line 110 column 3.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-default-length/m-p/98191#M290614</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-17T20:35:01Z</dc:date>
    </item>
  </channel>
</rss>

