<?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 Compress function in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882584#M348682</link>
    <description>&lt;P&gt;Hi I have a variable call splr_name which is a character variable and has alphanumeric values as shown in the picture and I need to extract only the numeric value and store it in a new variable called splr_number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Attached the picture for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compress(splr_name,'kd');&lt;/P&gt;&lt;P&gt;But I got the output as blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me on this&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="16878547053813280834064800100333.jpg" style="width: 749px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85410iAD3CF5AB4DE59DAF/image-size/large?v=v2&amp;amp;px=999" role="button" title="16878547053813280834064800100333.jpg" alt="16878547053813280834064800100333.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2023 08:32:53 GMT</pubDate>
    <dc:creator>Akshaya_1397</dc:creator>
    <dc:date>2023-06-27T08:32:53Z</dc:date>
    <item>
      <title>Compress function in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882584#M348682</link>
      <description>&lt;P&gt;Hi I have a variable call splr_name which is a character variable and has alphanumeric values as shown in the picture and I need to extract only the numeric value and store it in a new variable called splr_number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Attached the picture for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compress(splr_name,'kd');&lt;/P&gt;&lt;P&gt;But I got the output as blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me on this&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="16878547053813280834064800100333.jpg" style="width: 749px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85410iAD3CF5AB4DE59DAF/image-size/large?v=v2&amp;amp;px=999" role="button" title="16878547053813280834064800100333.jpg" alt="16878547053813280834064800100333.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 08:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882584#M348682</guid>
      <dc:creator>Akshaya_1397</dc:creator>
      <dc:date>2023-06-27T08:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compress function in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882587#M348684</link>
      <description>Have a look at the solution in this post: &lt;A href="https://communities.sas.com/t5/SAS-Programming/extract-numbers-from-variable-with-character-and-numeric/td-p/668092" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/extract-numbers-from-variable-with-character-and-numeric/td-p/668092&lt;/A&gt;</description>
      <pubDate>Tue, 27 Jun 2023 09:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882587#M348684</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2023-06-27T09:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compress function in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882590#M348686</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Compress(splr_name,'kd');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;splr_name=compress(splr_name,,'kd');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;note the two consecutive commas&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 09:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882590#M348686</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-27T09:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compress function in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882591#M348687</link>
      <description>&lt;P&gt;Maxim 1: Read the Documentation:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm" target="_blank" rel="noopener"&gt;COMPRESS Function&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;H2 id="p0pbnx173ekve9n1kno619iv4zpc" class="xisDoc-title"&gt;Syntax&lt;/H2&gt;
&lt;DIV id="n1cop1e8j57m8in1exaob09cljtq" class="xisDoc-syntaxSimple"&gt;
&lt;DIV class="xisDoc-syntaxLevel"&gt;&lt;SPAN class="xisDoc-keyword"&gt;COMPRESS&lt;/SPAN&gt;(&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p1cfydc2ifh484n1fodgztvpebog" target="_blank"&gt;source&lt;/A&gt;&lt;/EM&gt;,&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p1cm6en3ihcusmn1u6x1ue6vyvcj" target="_blank"&gt;characters&lt;/A&gt;&lt;/EM&gt;&amp;gt;&lt;/SPAN&gt;,&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;&lt;EM class="xisDoc-userSuppliedValue"&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/de/pgmsascdc/9.4_3.5/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm#p0t37skg8o4cfgn166syt5boeofr" target="_blank"&gt;modifier(s)&lt;/A&gt;&lt;/EM&gt;&amp;gt;&lt;/SPAN&gt;)&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV id="n1cop1e8j57m8in1exaob09cljtq" class="xisDoc-syntaxSimple"&gt;
&lt;DIV class="xisDoc-syntaxLevel"&gt;Note the non-optional commas; this means that there&amp;nbsp;&lt;U&gt;must&lt;/U&gt; be a second argument before the modifiers, if these are to be used. Therefore, you have to supply a second argument, even if it's empty or 'null'.&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Jun 2023 09:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882591#M348687</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-27T09:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Compress function in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882596#M348688</link>
      <description>Thankyou for the explanation it worked</description>
      <pubDate>Tue, 27 Jun 2023 10:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compress-function-in-sas/m-p/882596#M348688</guid>
      <dc:creator>Akshaya_1397</dc:creator>
      <dc:date>2023-06-27T10:08:24Z</dc:date>
    </item>
  </channel>
</rss>

