<?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: Impute missing data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668993#M200627</link>
    <description>&lt;P&gt;I&amp;nbsp; refuse to generate anything with 2 digit years and really dislike one digit days of months. Formats are transient. You can use any format you want. ddmmyy6. instead of date9.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the order of the names is hyper critical then you better specify that as a requirement.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2020 21:58:16 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-07-13T21:58:16Z</dc:date>
    <item>
      <title>data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668950#M200594</link>
      <description>Hi.</description>
      <pubDate>Wed, 15 Jul 2020 13:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/668950#M200594</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-07-15T13:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668957#M200601</link>
      <description>&lt;P&gt;Please post&amp;nbsp;&lt;STRONG&gt;SAS&amp;nbsp;&lt;/STRONG&gt;datasets in &lt;STRONG&gt;SAS&amp;nbsp;&lt;/STRONG&gt;code (data step with datalines). Keep in mind that this is not an Excel support forum.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 20:42:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/668957#M200601</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-13T20:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668970#M200612</link>
      <description>&lt;P&gt;One basic program:&lt;/P&gt;
&lt;PRE&gt;Proc sql;
   create table names as
   select distinct name
   from have
   ;
quit;

data want;
   set names;
   do date = "28FEB2020"D to"03MAR2020"D;;
      output;
   end;
   format date date9.;
run;

proc sort data=want;
   by date name;
run;&lt;/PRE&gt;
&lt;P&gt;Though I probably wouldn't use that sort order personally.&lt;/P&gt;
&lt;P&gt;If you really must use macro variables for the start and end it should be obvious where they go.&lt;/P&gt;
&lt;P&gt;I would strongly recommend using a two digit day of the month so there is no doubt whether 3Mar was actually intended to be 30Mar.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 21:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/668970#M200612</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-13T21:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668975#M200617</link>
      <description>&lt;P&gt;Please find the Simplified data in below text box&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 00:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/668975#M200617</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-07-14T00:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668993#M200627</link>
      <description>&lt;P&gt;I&amp;nbsp; refuse to generate anything with 2 digit years and really dislike one digit days of months. Formats are transient. You can use any format you want. ddmmyy6. instead of date9.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the order of the names is hyper critical then you better specify that as a requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 21:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/668993#M200627</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-13T21:58:16Z</dc:date>
    </item>
    <item>
      <title>data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/668998#M200631</link>
      <description />
      <pubDate>Wed, 15 Jul 2020 13:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/668998#M200631</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-07-15T13:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/669010#M200638</link>
      <description>&lt;P&gt;Create a second set with the start end periods as I did and append to your existing data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think.&lt;/P&gt;
&lt;P&gt;Not seeing a clearly stated difference.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 22:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/669010#M200638</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-13T22:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/669042#M200655</link>
      <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/294547" target="_blank" rel="noopener"&gt;Emma8,&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;First of all, your first data step HAVE is not correct, it does not read your datalines. Second of all, if you are producing DATEs defined by macro variables start and end, those DATEs defined in the first data step are irrelevant, you need to generate your new DATEs.&lt;/P&gt;
&lt;P&gt;Here is the code I believe will do what you want:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start="28FEB2020"D;
%let end="3MAR2020"D;

data HAVE;
   length NAME $10;
   infile datalines delimiter=':';
   input NAME;
   datalines;
Anna, Josh: 28/02/2020
John: 28/02/2020
Anna, Josh: 29/02/2020
John: 29/02/2020
Kate: 29/02/2020
Kate: 29/02/2020
John: 01/03/2020
Kate: 01/03/2020
;

proc sort data=HAVE out=UNIQUE_NAMES(keep=NAME) nodupkey;
   by NAME;
run;

data WANT;
   set UNIQUE_NAMES;
   do DATE=&amp;amp;start to &amp;amp;end;
      output;
   end;
   format DATE ddmmyy10.;
run;

proc sort data=WANT;
   by DATE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;DIV class="sas-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jul 2020 01:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/669042#M200655</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2020-07-14T01:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Impute missing data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data/m-p/669044#M200656</link>
      <description>Wow that was really helpful and works exactly what I wanted. Thank you so much!</description>
      <pubDate>Tue, 14 Jul 2020 01:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data/m-p/669044#M200656</guid>
      <dc:creator>Emma8</dc:creator>
      <dc:date>2020-07-14T01:23:04Z</dc:date>
    </item>
  </channel>
</rss>

