<?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 best way to create a variable and keep it as missing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-best-way-to-create-a-variable-and-keep-it-as-missing/m-p/328693#M73407</link>
    <description>&lt;P&gt;Create a template dataset which is what you want to be present, then set that with the data you get, best of both worlds:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table TEMPLATE (var1 char(200),var2 num,var3 char(50));
quit;

data data_in;
  var1="Abc";
  var3="Def";
run;

data want;
  set template data_in;
run;&lt;/PRE&gt;</description>
    <pubDate>Tue, 31 Jan 2017 10:48:55 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-01-31T10:48:55Z</dc:date>
    <item>
      <title>what is the best way to create a variable and keep it as missing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-best-way-to-create-a-variable-and-keep-it-as-missing/m-p/328690#M73405</link>
      <description>&lt;P&gt;I need help in:&lt;/P&gt;&lt;P&gt;I need to create a variable - and keep it as missing as it is not present in my dataset. However to make it standard and if that variable comes back in future.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i am using in the data step.&lt;/P&gt;&lt;P&gt;data inc;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; mhelp=" ";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in the above case if my mhelp variable comes back in future then it makes it as missing which i do not want to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 10:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-best-way-to-create-a-variable-and-keep-it-as-missing/m-p/328690#M73405</guid>
      <dc:creator>alexdsa</dc:creator>
      <dc:date>2017-01-31T10:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best way to create a variable and keep it as missing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-is-the-best-way-to-create-a-variable-and-keep-it-as-missing/m-p/328693#M73407</link>
      <description>&lt;P&gt;Create a template dataset which is what you want to be present, then set that with the data you get, best of both worlds:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table TEMPLATE (var1 char(200),var2 num,var3 char(50));
quit;

data data_in;
  var1="Abc";
  var3="Def";
run;

data want;
  set template data_in;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Jan 2017 10:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-is-the-best-way-to-create-a-variable-and-keep-it-as-missing/m-p/328693#M73407</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-31T10:48:55Z</dc:date>
    </item>
  </channel>
</rss>

