<?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 Not is null in a data step code in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115039#M31808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to have a column with concatenated values if one of the cell used to concatenate is not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do the following?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data icoplib.icop_alerts4 (drop=CRITERIA_VALUE_in);&lt;/P&gt;&lt;P&gt;set icoplib.icop_alerts3 (rename=(CRITERIA_VALUE=CRITERIA_VALUE_in));&lt;/P&gt;&lt;P&gt;if risk_level not is null then do;&lt;/P&gt;&lt;P&gt;criteria_value = trim(criteria_value_in) || ' - ' ||trim(risk_level);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;else do;&lt;/P&gt;&lt;P&gt;criteria_value=trim(criteria_value_in);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Aug 2013 14:56:58 GMT</pubDate>
    <dc:creator>nicnad</dc:creator>
    <dc:date>2013-08-19T14:56:58Z</dc:date>
    <item>
      <title>Not is null in a data step code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115039#M31808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to have a column with concatenated values if one of the cell used to concatenate is not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do the following?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data icoplib.icop_alerts4 (drop=CRITERIA_VALUE_in);&lt;/P&gt;&lt;P&gt;set icoplib.icop_alerts3 (rename=(CRITERIA_VALUE=CRITERIA_VALUE_in));&lt;/P&gt;&lt;P&gt;if risk_level not is null then do;&lt;/P&gt;&lt;P&gt;criteria_value = trim(criteria_value_in) || ' - ' ||trim(risk_level);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;else do;&lt;/P&gt;&lt;P&gt;criteria_value=trim(criteria_value_in);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 14:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115039#M31808</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-08-19T14:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Not is null in a data step code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115040#M31809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In data step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not missing(risk_level) then do;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might not need the if though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CATX function truncates blanks and places specified delimiter between strings.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;risk_level=''; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;criteria_value_in = 'criteria'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;criteria_value= catx('-',criteria_value_in,risk_level); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put criteria_value; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 15:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115040#M31809</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-08-19T15:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Not is null in a data step code</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115041#M31810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 15:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Not-is-null-in-a-data-step-code/m-p/115041#M31810</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2013-08-19T15:19:50Z</dc:date>
    </item>
  </channel>
</rss>

