<?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: What is the use of &amp;quot;C&amp;quot; modifier in compress function. compress(upcase(fullname),,'c') in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838909#M331705</link>
    <description>&lt;P&gt;According to the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_031/fedsqlref/n01p24mgwawxa2n1hy4gwe5t59xf.htm" target="_self"&gt;Compress Function Doc&lt;/A&gt;, The 'C' modifier&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;adds control characters to the list of characters.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see examples of control characters &lt;A href="https://www.geeksforgeeks.org/control-characters/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your data source is an external file, I assume that the file can contain control characters, that need to be removed. No need for two nested Compress Function calls though.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 08:07:56 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2022-10-17T08:07:56Z</dc:date>
    <item>
      <title>What is the use of "C" modifier in compress function. compress(upcase(fullname),,'c')</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838904#M331704</link>
      <description>&lt;P&gt;Hi Team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;In old code "C" modifier used in compress function please find code example below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data files;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;length f_name $200;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;infile retail;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;input;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;f_name=retail;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uname=compress(compress(upcase(f_name),,'c'),' ');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Question: What is the use of "C" modifier in compress function and it would be helpful if anybudy explain with brief examples.&amp;nbsp;&lt;BR /&gt;I tried to refer many sites and docs but no budy explained about "C" modifiers.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 07:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838904#M331704</guid>
      <dc:creator>veeresh10</dc:creator>
      <dc:date>2022-10-17T07:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use of "C" modifier in compress function. compress(upcase(fullname),,'c')</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838909#M331705</link>
      <description>&lt;P&gt;According to the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_031/fedsqlref/n01p24mgwawxa2n1hy4gwe5t59xf.htm" target="_self"&gt;Compress Function Doc&lt;/A&gt;, The 'C' modifier&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;adds control characters to the list of characters.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see examples of control characters &lt;A href="https://www.geeksforgeeks.org/control-characters/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your data source is an external file, I assume that the file can contain control characters, that need to be removed. No need for two nested Compress Function calls though.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838909#M331705</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-10-17T08:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use of "C" modifier in compress function. compress(upcase(fullname),,'c')</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838910#M331706</link>
      <description>&lt;P&gt;Adds all controll characters to the compress function (e.g. &lt;A title="Carriage return" href="https://en.wikipedia.org/wiki/Carriage_return" target="_blank"&gt;carriage return&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838910#M331706</guid>
      <dc:creator>BenPri</dc:creator>
      <dc:date>2022-10-17T08:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the use of "C" modifier in compress function. compress(upcase(fullname),,'c')</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838911#M331707</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p0t37skg8o4cfgn166syt5boeofr" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;will tell you everything you need to know (Maxim 1).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a quick example, run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
length c1 c2 c3 $8;
c1 = "X" !! "0d0a09"x !! "Y";
c2 = compress(c1," ","c");
c3 = compress(c1," ","kc");
put c2= $hex16. c3= $hex16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and study the log (Maxim 2).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS&lt;/P&gt;
&lt;P&gt;0D = carriage return&lt;/P&gt;
&lt;P&gt;0A = linefeed&lt;/P&gt;
&lt;P&gt;09 = tab&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-use-of-quot-C-quot-modifier-in-compress-function/m-p/838911#M331707</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-17T08:12:29Z</dc:date>
    </item>
  </channel>
</rss>

