<?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: Get the text before the last special character presence in SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582399#M13827</link>
    <description>&lt;P&gt;A little trickery with SAS character functions:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
new = 'SBIP://METASERVER/BI SAS VA REPORTS/AR Testing [Should always be in sync with Production]/Quality Dashboard V1(Report)';
run;

data want;
set have;
index = findc(new,'/',length(new)*(-1));
column1_want = scan(substr(new,index+1),1,'(');
column2_want = substr(new,1,index-1);
drop index;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 20 Aug 2019 12:04:57 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-08-20T12:04:57Z</dc:date>
    <item>
      <title>Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582387#M13823</link>
      <description>&lt;P&gt;Hi Team i want a new column output from below mentioned text dynamically.Kindly help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;DATA TEST;&lt;BR /&gt;NEW='SBIP://METASERVER/BI SAS VA REPORTS/AR Testing [Should always be in sync with Production]/Quality Dashboard V1(Report)';&lt;BR /&gt;TEST1 =(TRANSLATE(scan(NEW, -1,'/'),' ','_'));&lt;/P&gt;&lt;P&gt;FORMAT NEW $150. TEST1 $75.;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Out put want:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column1_want ="Quality Dashboard";&lt;/P&gt;&lt;P&gt;colunm2_want = "SBIP://METASERVER/BI SAS VA REPORTS/AR Testing [Should always be in sync with Production]"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 11:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582387#M13823</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-08-20T11:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582392#M13824</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/90077"&gt;@sivastat08&lt;/a&gt;&amp;nbsp; &amp;nbsp;Why is&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;V1(Report)&amp;nbsp; missing in your output&amp;nbsp;column1_want&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 11:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582392#M13824</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-20T11:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582393#M13825</link>
      <description>&lt;P&gt;yes sir , i want (Report) should be removed from the text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want output like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column1_want ="Quality Dashboard V1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 11:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582393#M13825</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-08-20T11:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582398#M13826</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TEST;
NEW='SBIP://METASERVER/BI SAS VA REPORTS/AR Testing [Should always be in sync with Production]/Quality Dashboard V1(Report)';
FORMAT NEW $150. TEST1 $75.;
RUN;

data want;
set test;
temp=scan(new,-1,'/');
column1_want=substr(temp,1,findc(temp,'(','b')-1);
colunm2_want=substr(new,1,findc(new,'/','b')-1);
drop temp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Aug 2019 12:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582398#M13826</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-20T12:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582399#M13827</link>
      <description>&lt;P&gt;A little trickery with SAS character functions:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
new = 'SBIP://METASERVER/BI SAS VA REPORTS/AR Testing [Should always be in sync with Production]/Quality Dashboard V1(Report)';
run;

data want;
set have;
index = findc(new,'/',length(new)*(-1));
column1_want = scan(substr(new,index+1),1,'(');
column2_want = substr(new,1,index-1);
drop index;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Aug 2019 12:04:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582399#M13827</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-20T12:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582402#M13828</link>
      <description>Thank a lot Sir</description>
      <pubDate>Tue, 20 Aug 2019 12:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582402#M13828</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-08-20T12:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get the text before the last special character presence in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582404#M13829</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/90077"&gt;@sivastat08&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank a lot &lt;STRIKE&gt;Sir&lt;/STRIKE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Haven't earned that. Btw, these kind of solutions that uses scan/find/call scan have been demonstrated extensively by Guru&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp; in &lt;STRONG&gt;many&lt;/STRONG&gt; of his posts in SAS L .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS-L however doesn't let users who do not have an account. What a spoil sport!!! . I don't have an account either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 12:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Get-the-text-before-the-last-special-character-presence-in-SAS/m-p/582404#M13829</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-20T12:11:18Z</dc:date>
    </item>
  </channel>
</rss>

