<?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: character string data manipulation help? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188710#M265919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input Variable_A : $200.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*AC.1.TR.AED.10011............AE0010201*AED1001199990201*DEBIT&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*AC.1.TR.AED.10011............AE0010201*ZZY &lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*TOTAL&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*ZZY&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*LD1404900037*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*LD1424400010*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*ZZY&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1403400034*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1409000161*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1409900008*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1412000039*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*ZZY&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.2.2400.AE....AE0010201*LD1231800018*LIVEDB&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt; length var1 var2 $ 100;&lt;/P&gt;&lt;P&gt; if scan(strip(Variable_A),-1,'*') = 'ZZY' then delete;&lt;/P&gt;&lt;P&gt; re=prxparse('/(?&amp;lt;=AED\.)(\d+).*\*(\w+)$/o');&lt;/P&gt;&lt;P&gt; if prxmatch(re,strip(Variable_A)) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var1=prxposn(re,1,strip(Variable_A));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var2=prxposn(re,2,strip(Variable_A));&lt;/P&gt;&lt;P&gt; end;&lt;/P&gt;&lt;P&gt; drop re;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jan 2015 11:59:22 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2015-01-19T11:59:22Z</dc:date>
    <item>
      <title>character string data manipulation help?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188709#M265918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requesting character string data manipulation help? I have a character variable with values shown below:/*the dataset has 1 million rows*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Variable_A&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*AC.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;10011&lt;/SPAN&gt;............AE0010201*AED1001199990201*&lt;SPAN style="color: #000080;"&gt;DEBIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*AC.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;10011&lt;/SPAN&gt;............AE0010201*ZZY /*this kind ending with ZZY should be deleted*/&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*TOTAL/*this kind of obs ending with TOTAL to be kept*/&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*ZZY/*this kind ending with ZZY should be deleted*/&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*LD1404900037*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*LD1424400010*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*ZZY/*this kind ending with ZZY should be deleted*/&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1403400034*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1409000161*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1409900008*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1412000039*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*ZZY/*this kind ending with ZZY should be deleted*/&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.&lt;SPAN style="color: #008000;"&gt;21069&lt;/SPAN&gt;.1017.AE.5Y.400022.1.2.2400.AE....AE0010201*LD1231800018*&lt;SPAN style="color: #000080;"&gt;LIVEDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Want:/*two new variables*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;new_variable1&lt;/STRONG&gt; should have values in &lt;SPAN style="color: #008000;"&gt;green &lt;SPAN style="color: #000000;"&gt;extracted from the character string.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;new_variable2&lt;/STRONG&gt; should have values in &lt;SPAN style="color: #000080;"&gt;blue &lt;SPAN style="color: #000000;"&gt;extracted from the character string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 10:54:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188709#M265918</guid>
      <dc:creator>MarkWik</dc:creator>
      <dc:date>2015-01-19T10:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: character string data manipulation help?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188710#M265919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input Variable_A : $200.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*AC.1.TR.AED.10011............AE0010201*AED1001199990201*DEBIT&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*AC.1.TR.AED.10011............AE0010201*ZZY &lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*AED*TOTAL&lt;/P&gt;&lt;P&gt;AkBGL.0130.AE0010201*ZZY&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*LD1404900037*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*LD1424400010*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.200004.1.17.2400.AE....AE0010201*ZZY&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1403400034*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1409000161*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1409900008*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*LD1412000039*LIVEDB&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.10.2400.AE....AE0010201*ZZY&lt;/P&gt;&lt;P&gt;AkBGL.0920.AE0010201*AED*LD.1.TR.AED.21069.1017.AE.5Y.400022.1.2.2400.AE....AE0010201*LD1231800018*LIVEDB&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt; length var1 var2 $ 100;&lt;/P&gt;&lt;P&gt; if scan(strip(Variable_A),-1,'*') = 'ZZY' then delete;&lt;/P&gt;&lt;P&gt; re=prxparse('/(?&amp;lt;=AED\.)(\d+).*\*(\w+)$/o');&lt;/P&gt;&lt;P&gt; if prxmatch(re,strip(Variable_A)) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var1=prxposn(re,1,strip(Variable_A));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var2=prxposn(re,2,strip(Variable_A));&lt;/P&gt;&lt;P&gt; end;&lt;/P&gt;&lt;P&gt; drop re;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 11:59:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188710#M265919</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-01-19T11:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: character string data manipulation help?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188711#M265920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xia Keshan, You are a genius and a SAS super star. Thank you so much. I need one more help in manipulation using the same input, I'll phrase that as a separate question and will look forward to your help if you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks from Down under,&lt;/P&gt;&lt;P&gt;Mark Wik&lt;/P&gt;&lt;P&gt;(from Australia)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 05:13:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188711#M265920</guid>
      <dc:creator>MarkWik</dc:creator>
      <dc:date>2015-01-20T05:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: character string data manipulation help?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188712#M265921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. If I could . Start a new session . Other SAS super stars would be able to offer you good advice too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 06:52:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188712#M265921</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-01-20T06:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: character string data manipulation help?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188713#M265922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please mark question as answered as well &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 06:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188713#M265922</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-20T06:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: character string data manipulation help?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188714#M265923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed I want to mark the question answered and embrace the great genius, but the green and orange pointers &lt;STRONG&gt;isn't&lt;/STRONG&gt; appearing in my screen for some reason despite the fact i logged in again and again to see if i can spot that. I guess perhaps i made a mistake to have missed out mark as a question when i first wrote the request. Please accept my heartfelt apologies&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 08:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/character-string-data-manipulation-help/m-p/188714#M265923</guid>
      <dc:creator>MarkWik</dc:creator>
      <dc:date>2015-01-20T08:21:50Z</dc:date>
    </item>
  </channel>
</rss>

