<?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: Substr statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266824#M52668</link>
    <description>&lt;P&gt;I don't quite understand why TYPE is the last character.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Apr 2016 19:11:34 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2016-04-27T19:11:34Z</dc:date>
    <item>
      <title>Substr statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266797#M52652</link>
      <description>&lt;P&gt;Hi, all:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found these codes written from previous programmer.&amp;nbsp;&amp;nbsp; Is it the (&lt;STRONG&gt;1&lt;/STRONG&gt;,length(indicator)-&lt;STRONG&gt;1) in IND and (length(indicator),&lt;STRONG&gt;1&lt;/STRONG&gt;) in TYPE are the same?&amp;nbsp; Please help.&amp;nbsp; Thanks.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IND=substr(INDICATOR,&lt;STRONG&gt;1&lt;/STRONG&gt;,length(indicator)-&lt;STRONG&gt;1&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;TYPE=substr(INDICATOR,length(indicator),&lt;STRONG&gt;1&lt;/STRONG&gt;); &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266797#M52652</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-04-27T17:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Substr statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266800#M52654</link>
      <description>&lt;P&gt;IND is the whole string except the last character&lt;/P&gt;
&lt;P&gt;TYPE is the last character&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 18:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266800#M52654</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-04-27T18:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Substr statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266824#M52668</link>
      <description>&lt;P&gt;I don't quite understand why TYPE is the last character.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 19:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266824#M52668</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-04-27T19:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Substr statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266832#M52672</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#0000ff"&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" face="Trebuchet MS"&gt;SUBSTR( ) Used on Right Side on Assignment Statement.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT face="trebuchet ms,sans-serif" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="trebuchet ms,sans-serif" size="3"&gt;SYNTAX:&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT face="trebuchet ms,sans-serif" size="3"&gt;=SUBSTR (char_string,&amp;nbsp;start_position,no_of_chars_to_read&amp;nbsp;);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Times New Roman;"&gt;&lt;FONT color="#444444"&gt;&lt;FONT size="3"&gt;&lt;FONT face="trebuchet ms,sans-serif"&gt;extracts char string from start position and with length given.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Times New Roman;"&gt;&lt;FONT color="#444444"&gt;&lt;FONT size="3"&gt;&lt;FONT face="trebuchet ms,sans-serif"&gt;&lt;SPAN&gt;In that mean, TYPE is starting the whole length of "INDICATOR", and only extract the last number? right?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Apr 2016 19:27:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266832#M52672</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-04-27T19:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Substr statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266839#M52678</link>
      <description>&lt;P&gt;For example, "ybz12003" has length 8, so the string of length 1 starting at position 8 is "3".&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 19:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266839#M52678</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-04-27T19:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Substr statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266878#M52698</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 23:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substr-statement/m-p/266878#M52698</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-04-27T23:36:58Z</dc:date>
    </item>
  </channel>
</rss>

