<?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: How to remove special characters only from first position? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204099#M37998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I request to give a code snippet as I was doing something wrong with these function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2015 05:07:48 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2015-08-21T05:07:48Z</dc:date>
    <item>
      <title>How to remove special characters only from first position?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204097#M37996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've a data like below. Here I need to remove only the colon (:) in the variable 'userid' if it is a first character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 164px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="164"&gt;userid &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;:sassrv&lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;:datapo@saspw&lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;74064:datapo@saspw&lt;/TD&gt; &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the data as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="64"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="64"&gt;userid &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;sassrv&lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;&lt;A href="mailto:datapo@saspw"&gt;datapo@saspw&lt;/A&gt;&lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;74064:datapo@saspw&lt;/TD&gt; &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with compress function to achieve this, but could not succeed. Please advise,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 04:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204097#M37996</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-08-21T04:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove special characters only from first position?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204098#M37997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why didn't it work with compress? &lt;/P&gt;&lt;P&gt;You need to use it in conjunction with if, substr and cats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 04:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204098#M37997</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-08-21T04:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove special characters only from first position?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204099#M37998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I request to give a code snippet as I was doing something wrong with these function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 05:07:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204099#M37998</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-08-21T05:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove special characters only from first position?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204100#M37999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3 style="color: #353535; font-family: Lato, sans-serif; background-color: #f0f1f2;"&gt;Code: Program&lt;/H3&gt;&lt;PRE class="sce-render" style="font-family: 'Courier New', Menlo, 'Lucida Console'; font-size: 16px;"&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;have&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;input&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;userid&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="format" style="color: #008080;"&gt;$40.&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;cards&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cards-data" style="color: #bb9905;"&gt;:sassrv&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cards-data" style="color: #bb9905;"&gt;:datapo@saspw&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cards-data" style="color: #bb9905;"&gt;74064:datapo@saspw&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;want&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;set&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;have&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;prxchange&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'s/^://'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="numeric" style="color: #008080; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;userid&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 11:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204100#M37999</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-08-21T11:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove special characters only from first position?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204101#M38000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data log_analysis;&lt;/P&gt;&lt;P&gt;infile '/usr/sas/sas_config/Lev1/SASApp/Logs/SASApp_STP_2015-08-19_tmp1_19142.log' truncover;&lt;/P&gt;&lt;P&gt;input var : $ 3000.;&lt;/P&gt;&lt;P&gt;var1 = _infile_;&lt;/P&gt;&lt;P&gt;if var1 = :'2015';&lt;/P&gt;&lt;P&gt;Date_With_TimeStamp = scan(var1,1," ");&lt;/P&gt;&lt;P&gt;Status = scan(var1,2," ");&lt;/P&gt;&lt;P&gt;Processid = scan(var1,3," ");&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if substr(scan(var1,4," "),1,1)=':' then userid =substr(scan(var1,4," "),2) ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else userid = scan(var1,4," ");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Details = scan(var1,-1,'-');&lt;/P&gt;&lt;P&gt;drop var var1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 13:02:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-remove-special-characters-only-from-first-position/m-p/204101#M38000</guid>
      <dc:creator>MadhuKorni</dc:creator>
      <dc:date>2015-08-21T13:02:32Z</dc:date>
    </item>
  </channel>
</rss>

