<?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: scan function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481903#M124735</link>
    <description>&lt;P&gt;Please read the SAS 9.4 documentation at&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0jshdjy2z9zdzn1h7k90u99lyq6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0jshdjy2z9zdzn1h7k90u99lyq6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which says&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;In a DATA step, if the SCAN function returns a value to a variable that has not yet been given a length, that variable is given the length of the first argument.&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="xis-windowItem"&gt;This behavior is different from the behavior in previous releases of SAS. In previous releases, code that created a variable with a length of 200 might have produced a variable with a length that was greater than expected.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;If you need the SCAN function to assign a variable with a value that is different from the length of the first argument, use a LENGTH statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 27 Jul 2018 15:30:54 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-07-27T15:30:54Z</dc:date>
    <item>
      <title>scan function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481896#M124734</link>
      <description>&lt;P&gt;data test;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x&amp;nbsp; =&amp;nbsp; 'charles dickens' ;&lt;/P&gt;&lt;P&gt;y =scan (x ,2 ) ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;length of scan function is said to be 200 , then why i am getting the length of y as 15 .&amp;nbsp;substr&amp;nbsp;function takes the length of input function is scan function also working like this ?&amp;nbsp;please help .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 15:25:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481896#M124734</guid>
      <dc:creator>sanyam13</dc:creator>
      <dc:date>2018-07-27T15:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: scan function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481903#M124735</link>
      <description>&lt;P&gt;Please read the SAS 9.4 documentation at&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0jshdjy2z9zdzn1h7k90u99lyq6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0jshdjy2z9zdzn1h7k90u99lyq6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which says&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;In a DATA step, if the SCAN function returns a value to a variable that has not yet been given a length, that variable is given the length of the first argument.&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="xis-windowItem"&gt;This behavior is different from the behavior in previous releases of SAS. In previous releases, code that created a variable with a length of 200 might have produced a variable with a length that was greater than expected.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;If you need the SCAN function to assign a variable with a value that is different from the length of the first argument, use a LENGTH statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 27 Jul 2018 15:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481903#M124735</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-27T15:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: scan function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481907#M124736</link>
      <description>&lt;P&gt;because Y takes the lenght of X since Y was not declared until you assigned Y to scan X&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 15:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481907#M124736</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-07-27T15:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: scan function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481909#M124737</link>
      <description>&lt;P&gt;data test;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lenght y $200;&lt;/P&gt;&lt;P&gt;x&amp;nbsp; =&amp;nbsp; 'charles dickens' ;&lt;/P&gt;&lt;P&gt;y =scan (x ,2 ) ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 15:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function/m-p/481909#M124737</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-07-27T15:37:55Z</dc:date>
    </item>
  </channel>
</rss>

