<?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: base sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419313#M103092</link>
    <description>&lt;P&gt;If you want everything from including and to the right of the sixth character just use&lt;/P&gt;
&lt;PRE&gt;%qsubstr(&amp;amp;file3,6)&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2017 19:38:46 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-12-07T19:38:46Z</dc:date>
    <item>
      <title>QSUBSTR out of range error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419304#M103086</link>
      <description>&lt;P&gt;%if &amp;amp;file2 = I1099TY %then %do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %if &amp;amp;i = 2015 and &amp;amp;file2 = I1099TY and %qsubstr(&amp;amp;file3,1,5) = _2015&amp;nbsp; %then %do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let pfile3 = _2016;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let sfile3 = %qsubstr(&amp;amp;file3,6,3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let file3&amp;nbsp; = %trim(&amp;amp;pfile3&amp;amp;sfile3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get a warning stating that the %qsubstr is out of range. &amp;amp;file3 = _201706&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Note that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;has modified the subject line to be reflective of the question. Please try and use a descriptive subject line in the future.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:46:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419304#M103086</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2017-12-07T19:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419306#M103087</link>
      <description>&lt;P&gt;Yes, focus on this statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;%let sfile3 = %qsubstr(&amp;amp;file3,6,3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When &amp;amp;FILE3 is _201706, the sixth character is the second "0".&amp;nbsp; If you start at that point, and attempt to take 3 characters, you will find that you run out of characters.&amp;nbsp; There are only two characters left.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:33:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419306#M103087</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-07T19:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419307#M103088</link>
      <description>&lt;P&gt;Sorry &amp;amp;file3 - _201507&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419307#M103088</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2017-12-07T19:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419308#M103089</link>
      <description>&lt;P&gt;So what is the fixing solution?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:35:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419308#M103089</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2017-12-07T19:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419312#M103091</link>
      <description>&lt;P&gt;Well, you don't exactly say what you want to achieve here.&amp;nbsp; If this gives you the right answer, it would be a possible solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let sfile3 = %qsubstr(&amp;amp;file3,6,&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;);&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419312#M103091</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-07T19:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419313#M103092</link>
      <description>&lt;P&gt;If you want everything from including and to the right of the sixth character just use&lt;/P&gt;
&lt;PRE&gt;%qsubstr(&amp;amp;file3,6)&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 19:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419313#M103092</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-12-07T19:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: base sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419327#M103096</link>
      <description>Thank you much. This got rid of the warning.</description>
      <pubDate>Thu, 07 Dec 2017 20:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QSUBSTR-out-of-range-error/m-p/419327#M103096</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2017-12-07T20:03:16Z</dc:date>
    </item>
  </channel>
</rss>

