<?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: Reg Uncompressing Tab in the Data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17572#M3357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Interesting - it worked with my Win7 SAS9.3 version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id='A'||'09'x||'0A'x||' A';&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put id hex.;&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id=compbl(prxchange('s/\s/ /o', -1, id));&lt;BR /&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put id hex.;&lt;BR /&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;41090A2041&lt;BR /&gt;4120412020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as Ksharp demonstrates it's only about little tweaks to the RegEx if it doesn't do what you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Dec 2011 04:14:46 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2011-12-22T04:14:46Z</dc:date>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17560#M3345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually i am having data coming in text file the delimiter in ^ actually in some obs there is tab but it was removing the tab also now i want to replace tab with space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below example data has tab between ra and if i run it was remoivng the tab and i wnat to replace it with spaces &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data l2;&lt;BR /&gt;input id$ 1-7 age ;&lt;BR /&gt;cards;&lt;BR /&gt;ra&amp;nbsp; ok 56&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 11:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17560#M3345</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-19T11:17:51Z</dc:date>
    </item>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17561#M3346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not clear what your question is.&amp;nbsp; But if you have a text file and you want to have SAS expand the tabs into space when reading it look at the EXPANDTABS option on the INFILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data l2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile 'myfile.dat' expandtabs truncover ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id$ 1-7 age ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 13:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17561#M3346</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-12-19T13:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17562#M3347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data l2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; infile cards expandtabs ;&lt;BR /&gt;&amp;nbsp; input id$ 1-57 ;&lt;BR /&gt;id1=compbl(id);&lt;BR /&gt;cards;&lt;BR /&gt;user&amp;nbsp;&amp;nbsp; done&amp;nbsp;&amp;nbsp;&amp;nbsp; ok&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Actually i want to replace tabs with space in the above from user to done there is tab and from done to k there is space i want to replace the tab with the space actually i have tryed it compbl,trim functions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;user done&amp;nbsp;&amp;nbsp;&amp;nbsp; ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 06:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17562#M3347</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-20T06:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17563#M3348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use TRANWRD to change tabs into spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id1=compbl(tranwrd(id,'09'x,' '));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you really have tabs inside your datalines inside your program file then you might want to change the settings on your editor so that all tabs are converted to spaces when you save.&amp;nbsp;&amp;nbsp; Personally I always do this as I find that tabs in source code cause more trouble than any benefit they might add.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 06:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17563#M3348</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-12-20T06:57:48Z</dc:date>
    </item>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17564#M3349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; i have checked by tranwrd it was not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 07:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17564#M3349</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-20T07:42:15Z</dc:date>
    </item>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17565#M3350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should work. See below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; id='A'||'09'x||' A';&lt;BR /&gt;&amp;nbsp; put id hex.;&lt;BR /&gt;&amp;nbsp; id=compbl(tranwrd(id,'09'x,' '));&lt;BR /&gt;&amp;nbsp; put id hex.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you work on z/OS as there the Hex value for a tab would be 05.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 09:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17565#M3350</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-12-20T09:50:41Z</dc:date>
    </item>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17566#M3351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It must not be a TAB then.&amp;nbsp; Use either the list statement or the $HEX format to see what character it is.&amp;nbsp; Perhaps it is 'A0'x which some editors use to store a non-breaking space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 13:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17566#M3351</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-12-20T13:58:16Z</dc:date>
    </item>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17567#M3352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Below code should replace any whitespace character with a "blank":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id='A'||'09'x||'0A'x||' A';&lt;/P&gt;&lt;P&gt;&amp;nbsp; put id hex.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id=compbl(prxchange('s/\s/ /o', -1, id));&lt;/P&gt;&lt;P&gt;&amp;nbsp; put id hex.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 00:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17567#M3352</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-12-21T00:44:08Z</dc:date>
    </item>
    <item>
      <title>Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17568#M3353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unforturnately the regex function does not consider A0 as a blank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 00:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17568#M3353</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-12-21T00:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17569#M3354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom. How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data _null_;
&amp;nbsp; id='A'||'09'x||'A0'x||' A';
&amp;nbsp; put id hex.;
&amp;nbsp; id=compbl(prxchange('s/[\s\xA0]/ /o', -1, id));
&amp;nbsp; put id hex.;
run;


data _null_;
&amp;nbsp; id='A'||'09'x||'A0'x||' A';
&amp;nbsp; put id hex.;
&amp;nbsp; id=compbl(prxchange('s/\s|[[:^ascii:]]/ /o', -1, id));
&amp;nbsp; put id hex.;
run;

&lt;/PRE&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;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 02:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17569#M3354</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-21T02:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17570#M3355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; HI sharp how can we write this prxcahnge any information to write that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 08:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17570#M3355</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-21T08:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17571#M3356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What did you mean? I can't understand your words.&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;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 02:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17571#M3356</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-22T02:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17572#M3357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Interesting - it worked with my Win7 SAS9.3 version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id='A'||'09'x||'0A'x||' A';&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put id hex.;&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id=compbl(prxchange('s/\s/ /o', -1, id));&lt;BR /&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put id hex.;&lt;BR /&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;41090A2041&lt;BR /&gt;4120412020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as Ksharp demonstrates it's only about little tweaks to the RegEx if it doesn't do what you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 04:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17572#M3357</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-12-22T04:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reg Uncompressing Tab in the Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17573#M3358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patrick.&lt;/P&gt;&lt;P&gt;Tom means 'A0'x&amp;nbsp;&amp;nbsp; not '0A'x&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 05:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reg-Uncompressing-Tab-in-the-Data/m-p/17573#M3358</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-22T05:08:03Z</dc:date>
    </item>
  </channel>
</rss>

