<?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: which masking string should be used when used . in place of missing numeric values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531567#M145510</link>
    <description>&lt;P&gt;No masking is needed, see this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.class;
if mod(_n_,2) = 1 then age = .;
run;

%let whr=where age = . and substr(name,1,1) = 'J';

proc sql;
create table want as
select * from have
&amp;amp;whr
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Jan 2019 06:46:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-01-31T06:46:33Z</dc:date>
    <item>
      <title>which masking string should be used when used . in place of missing numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531563#M145507</link>
      <description>&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let whr=%str(where randfl="Y" and ASATFL="Y" and DCTRTDT=. and dthdt=. and missing(DCSTYDT));              

proc sql;
create table aaa as
select count(distinct usubjid) as nobs
from adsl
&amp;amp;whr;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;Dear ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my code, when i used &lt;FONT color="#FF6600"&gt;dot&amp;nbsp;&lt;FONT color="#000000"&gt; for missing values the below code is not working&lt;FONT color="#000000"&gt;, but when i used &lt;FONT color="#FF6600"&gt;missing&lt;/FONT&gt; function it works. Which one should i use in place of %str when i use&amp;nbsp; &lt;FONT color="#993300"&gt;DOT.&amp;nbsp; &lt;FONT color="#000000"&gt;Thank you&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#993300"&gt;In my code,&amp;nbsp;&lt;CODE class=" language-sas"&gt;DCTRTDT=. and dthdt=. are not resolving, but missing(DCSTYDT) is resolving&amp;nbsp;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 06:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531563#M145507</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2019-01-31T06:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: which masking string should be used when used . in place of missing numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531567#M145510</link>
      <description>&lt;P&gt;No masking is needed, see this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.class;
if mod(_n_,2) = 1 then age = .;
run;

%let whr=where age = . and substr(name,1,1) = 'J';

proc sql;
create table want as
select * from have
&amp;amp;whr
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jan 2019 06:46:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531567#M145510</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-01-31T06:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: which masking string should be used when used . in place of missing numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531586#M145525</link>
      <description>&lt;P&gt;Why pass SAS code in via macros in the first place?&amp;nbsp; SAS code can contain all kinds of special characters, quotes etc. which will mess up your code.&amp;nbsp; There are much better ways of doing things.&amp;nbsp; For example, if your macro or code needs that data filtered, create a new dataset which is already filtered, then pass that filtered data into your macro.&amp;nbsp; The coding then is very simple Base SAS, and passing of SAS code is not needed.&amp;nbsp; Your just obfuscating your code for no benefit.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 08:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531586#M145525</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-01-31T08:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: which masking string should be used when used . in place of missing numeric values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531641#M145552</link>
      <description>&lt;P&gt;Since the text in your macro variable is quoted, you need to unquote it when it is used. See example below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.class;
if mod(_n_,2) = 1 then age = .;
run;

%let whr= %str(where age = . and substr(name,1,1) = 'J');

proc sql;
create table want as
select * from have
%unquote(&amp;amp;whr)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;for the sample&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 14:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/which-masking-string-should-be-used-when-used-in-place-of/m-p/531641#M145552</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2019-01-31T14:16:56Z</dc:date>
    </item>
  </channel>
</rss>

