<?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: End date imputations in adams in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465466#M118727</link>
    <description>&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i didn't get any logic for that...can u pls provide if any...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kudos in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 May 2018 12:58:53 GMT</pubDate>
    <dc:creator>rajeshV89</dc:creator>
    <dc:date>2018-05-28T12:58:53Z</dc:date>
    <item>
      <title>End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465330#M118686</link>
      <description>&lt;P&gt;here iam trying this code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* End date Imputations */&lt;/P&gt;&lt;P&gt;data mh;&lt;BR /&gt;input usubjid $ 1-17 mhendtc $ 19-28;&lt;BR /&gt;cards;&lt;BR /&gt;SCL004-14001-9001&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9002&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9002 2003&lt;BR /&gt;SCL004-14001-9002&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9003&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9003 2004&lt;BR /&gt;SCL004-14001-9003&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9004 2006-11&lt;BR /&gt;SCL004-14001-9004&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9004 2010-04&lt;BR /&gt;SCL004-14001-9004&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9004&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9005 2002&lt;BR /&gt;SCL004-14001-9005&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9006&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;SCL004-14001-9006 2011-09-17&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _mh;&lt;BR /&gt;set mh;&lt;BR /&gt;format mhed yymmdd10.;&lt;BR /&gt;enday=input(substr(mhendtc,9,2),best.);&lt;BR /&gt;enmonth=input(substr(mhendtc,6,2),best.);&lt;BR /&gt;enyear=input(substr(mhendtc,1,4),best.);&lt;BR /&gt;if enday ne . and enmonth ne . and enyear ne . then mhed=mdy(enmonth,enday,enyear);&lt;BR /&gt;else if enday = . and enmonth = . then mhed=mdy(12, 31, enyear);&lt;BR /&gt;else if enday = . then mhed=intnx('month',mdy(enmonth,01,enyear),0,'E');&lt;BR /&gt;else if mhendtc=' ' then mhed=.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but iam&amp;nbsp;getting this warning why?:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;737 data _mh;&lt;BR /&gt;738 set mh;&lt;BR /&gt;739 format mhed yymmdd10.;&lt;BR /&gt;740 enday=input(substr(mhendtc,9,2),best.);&lt;BR /&gt;741 enmonth=input(substr(mhendtc,6,2),best.);&lt;BR /&gt;742 enyear=input(substr(mhendtc,1,4),best.);&lt;BR /&gt;743 if enday ne . and enmonth ne . and enyear ne . then mhed=mdy(enmonth,enday,enyear);&lt;BR /&gt;744 else if enday = . and enmonth = . then mhed=mdy(12, 31, enyear);&lt;BR /&gt;745 else if enday = . then mhed=intnx('month',mdy(enmonth,01,enyear),0,'E');&lt;BR /&gt;746 else if mhendtc=' ' then mhed=.;&lt;BR /&gt;747 run;&lt;/P&gt;&lt;P&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;10 at 744:45&lt;BR /&gt;NOTE: There were 16 observations read from the data set WORK.MH.&lt;BR /&gt;NOTE: The data set WORK._MH has 16 observations and 6 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly give the suitable code pls...kudos in advance&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 13:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465330#M118686</guid>
      <dc:creator>rajeshV89</dc:creator>
      <dc:date>2018-05-27T13:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465332#M118688</link>
      <description>&lt;P&gt;You're trying to read (i.e. use substr) where there isn't data to read. The following would get around that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _mh;
  set mh;
  format mhed yymmdd10.;
  if countc(mhendtc,'-') eq 0 then mhed=mdy(12,31,input(mhendtc,8.)); 
  else if countc(mhendtc,'-') eq 1 then do;
    mhed=mdy(input(scan(mhendtc,2,'-'),8.),1,input(scan(mhendtc,1,'-'),8.));
    mhed=intnx('month',mhed,0,'E');
  end;
  else if countc(mhendtc,'-') eq 2 then do;
    mhed=mdy(input(scan(mhendtc,2,'-'),8.),input(scan(mhendtc,3,'-'),8.),input(scan(mhendtc,1,'-'),8.));
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 14:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465332#M118688</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-05-27T14:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465333#M118689</link>
      <description>&lt;P&gt;First of all, I do not see any warnings in your log? Only notes. There is a big difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume that you ask about the notes. The "&lt;SPAN&gt;Missing values were generated as a result of performing an operation on missing values." note appears because your substring functions return missing values which you then try to convert to a numeric value with the INPUT Function.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 14:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465333#M118689</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-05-27T14:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465340#M118690</link>
      <description>&lt;P&gt;i need one column like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.JPG" style="width: 243px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20795i8D3E0BADC303856E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.JPG" alt="Capture4.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 16:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465340#M118690</guid>
      <dc:creator>rajeshV89</dc:creator>
      <dc:date>2018-05-27T16:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465341#M118691</link>
      <description>&lt;P&gt;yeah..iam&amp;nbsp;hurry i've wrongly typed that as warning instead of note..thanks for reminding&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 16:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465341#M118691</guid>
      <dc:creator>rajeshV89</dc:creator>
      <dc:date>2018-05-27T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465342#M118692</link>
      <description>&lt;P&gt;still iam&amp;nbsp;getting the note as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;276 at 992:41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here iam&amp;nbsp;providing the data for that:&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 16:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465342#M118692</guid>
      <dc:creator>rajeshV89</dc:creator>
      <dc:date>2018-05-27T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465356#M118696</link>
      <description>&lt;P&gt;When mhendtc is completely empty, you can't pull anything from it, no date and no year, so you will get missing values. You need to provide logic for such cases, eg define a default year.&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 19:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465356#M118696</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-27T19:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465466#M118727</link>
      <description>&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i didn't get any logic for that...can u pls provide if any...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kudos in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 12:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465466#M118727</guid>
      <dc:creator>rajeshV89</dc:creator>
      <dc:date>2018-05-28T12:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465469#M118729</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/199507"&gt;@rajeshV89&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hi..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i didn't get any logic for that...can u pls provide if any...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kudos in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you have no clue what to do in such cases, then how should we? It's up to you alone (or those you work for) to define what to do in such cases. Once the logic is known, it can be put into SAS code.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 13:08:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/465469#M118729</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-28T13:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: End date imputations in adams</title>
      <link>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/734741#M228878</link>
      <description>&lt;P&gt;If leap year and month of February then end day (extra day)&amp;nbsp; should be 29 and not leap year and month of February then end day should be 28. Also, end of the day for January, March, May, July, August, October, December are 31 and end of the day for April, June, September, November are 30.&lt;/P&gt;&lt;P&gt;Code required update using leap year and month.&lt;/P&gt;&lt;P&gt;leapyear = (mod(year,4) = 0) and ((mod(year,100) ne 0) or (mod(year,400) = 0));&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 14:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/End-date-imputations-in-adams/m-p/734741#M228878</guid>
      <dc:creator>bsd70</dc:creator>
      <dc:date>2021-04-16T14:52:00Z</dc:date>
    </item>
  </channel>
</rss>

