<?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: Invalid argument to function MDY in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63283#M17978</link>
    <description>Remember, one or more SAS Diagnostic Statements like PUTLOG (new with SAS 9) are a programmer's best friend!!&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Tue, 11 Aug 2009 22:05:59 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-08-11T22:05:59Z</dc:date>
    <item>
      <title>Invalid argument to function MDY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63279#M17974</link>
      <description>Hi, &lt;BR /&gt;
&lt;BR /&gt;
I'm getting the following error. I checked the dates and they all seem valid.  Any troubleshooting tips?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Here's the code:     &lt;BR /&gt;
&lt;BR /&gt;
array datesas bdate polio1 polio2 polio3 polio4 polio5 dtp1 dtp2 dtp3 dtp4 dtp5 dtp6&lt;BR /&gt;
      mmr1 mmr2 hib1 hib2 hib3 hib4 hepb1 hepb2 hepb3 var1 var2;&lt;BR /&gt;
    array months bdate_m polio1_m polio2_m polio3_m polio4_m polio5_m dtp1_m dtp2_m dtp3_m&lt;BR /&gt;
      dtp4_m dtp5_m dtpb_m mmr1_m mmr2_m hib1_m hib2_m hib3_m hib4_m hepb1_m hepb2_m hepb3_m&lt;BR /&gt;
	  var1_m var2_m;&lt;BR /&gt;
    array days bdate_d polio1_d polio2_d polio3_d polio4_d polio5_d dtp1_d dtp2_d dtp3_d&lt;BR /&gt;
      dtp4_d dtp5_d dtpb_d mmr1_d mmr2_d hib1_d hib2_d hib3_d hib4_d hepb1_d hepb2_d hepb3_d&lt;BR /&gt;
	  var1_d var2_d;&lt;BR /&gt;
    array years bdate_y polio1_y polio2_y polio3_y polio4_y polio5_y dtp1_y dtp2_y dtp3_y&lt;BR /&gt;
      dtp4_y dtp5_y dtpb_y mmr1_y mmr2_y hib1_y hib2_y hib3_y hib4_y hepb1_y hepb2_y hepb3_y&lt;BR /&gt;
	  var1_y var2_y;&lt;BR /&gt;
    do over datesas;&lt;BR /&gt;
      datesas=mdy(months, days, years);&lt;BR /&gt;
    end;&lt;BR /&gt;
&lt;BR /&gt;
Here's the log:  &lt;BR /&gt;
NOTE: Invalid argument to function MDY at line 1763 column 14.&lt;BR /&gt;
SRIDNUM=K059 CHILDNUM=010 RACE=1 ETHNIC=1 P_BIRTH=1 TYPE_REC=1 EXEMPT=0 COUNTY=19 VAR_HX=0 BDATE_M=10 BDATE_D=01 BDATE_Y=03&lt;BR /&gt;
POLIO1_M=12 POLIO1_D=05 POLIO1_Y=03 POLIO2_M=02 POLIO2_D=13 POLIO2_Y=04 POLIO3_M=04 POLIO3_D=22 POLIO3_Y=04 POLIO4_M=03&lt;BR /&gt;
POLIO4_D=31 POLIO4_Y=08 POLIO5_M=  POLIO5_D=  POLIO5_Y=  DTP1_M=12 DTP1_D=05 DTP1_Y=03 DTP2_M=02 DTP2_D=13 DTP2_Y=04 DTP3_M=04&lt;BR /&gt;
DTP3_D=22 DTP3_Y=04 DTP4_M=04 DTP4_D=05 DTP4_Y=05 DTP5_M=04 DTP5_D=31 DTP5_Y=08 DTPB_M=  DTPB_D=  DTPB_Y=  MMR1_M=10 MMR1_D=05&lt;BR /&gt;
MMR1_Y=04 MMR2_M=03 MMR2_D=31 MMR2_Y=08 HIB1_M=  HIB1_D=  HIB1_Y=  HIB2_M=  HIB2_D=  HIB2_Y=  HIB3_M=  HIB3_D=  HIB3_Y=&lt;BR /&gt;
HIB4_M=  HIB4_D=  HIB4_Y=  HEPB1_M=10 HEPB1_D=03 HEPB1_Y=03 HEPB2_M=01 HEPB2_D=19 HEPB2_Y=04 HEPB3_M=07 HEPB3_D=28 HEPB3_Y=04&lt;BR /&gt;
VAR1_M=10 VAR1_D=05 VAR1_Y=04 VAR2_M=03 VAR2_D=31 VAR2_Y=08 _I_=23 sridnum_error=0 childnum_error=0 race_error=0 ethnic_error=0&lt;BR /&gt;
p_birth_error=0 type_rec_error=0 exempt_error=0 county_error=0 var_hx_error=0 bdate_m_error=0 bdate_d_error=0 bdate_y_error=0&lt;BR /&gt;
bdate=15979 bdate_error=0 polio1=16044 polio2=16114 polio3=16183 polio4=17622 polio5=. dtp1=16044 dtp2=16114 dtp3=16183&lt;BR /&gt;
dtp4=16531 dtp5=. dtpb=. mmr1=16349 mmr2=17622 hib1=. hib2=. hib3=. hib4=. hepb1=15981 hepb2=16089 hepb3=16280 var1=16349&lt;BR /&gt;
var2=17622 polio1_error=0 polio2_error=0 polio3_error=0 polio4_error=0 polio5_error=0 dtp1_error=0 dtp2_error=0 dtp3_error=0&lt;BR /&gt;
dtp4_error=0 dtp5_error=0 dtpb_error=0 mmr1_error=0 mmr2_error=0 hib1_error=0 hib2_error=0 hib3_error=0 hib4_error=0&lt;BR /&gt;
hepb1_error=0 hepb2_error=0 hepb3_error=0 var1_error=0 var2_error=0 polio_dose=0 i=2 dtp_dose=0 mmr_dose=0 hib_dose=0&lt;BR /&gt;
hepb_dose=0 var_dose=0 _ERROR_=1 _N_=537&lt;BR /&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;
      9931 at 1763:14&lt;BR /&gt;
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to&lt;BR /&gt;
      missing values.&lt;BR /&gt;
      Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;
      1 at 1763:14

Message was edited by: jcis</description>
      <pubDate>Tue, 11 Aug 2009 17:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63279#M17974</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-11T17:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function MDY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63280#M17975</link>
      <description>Suggest you add the SAS statement below (within the DO/END, just before the END;) to reveal the problem cause:&lt;BR /&gt;
&lt;BR /&gt;
if not datesas then putlog '&amp;gt;diag&amp;gt;' / _all_;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 11 Aug 2009 18:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63280#M17975</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-11T18:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function MDY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63281#M17976</link>
      <description>DTP5_M=04 DTP5_D=31 DTP5_Y=08&lt;BR /&gt;
&lt;BR /&gt;
You have April 31, 2008  which does not exist.</description>
      <pubDate>Tue, 11 Aug 2009 18:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63281#M17976</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-08-11T18:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function MDY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63282#M17977</link>
      <description>: - )  Thank you!!!!</description>
      <pubDate>Tue, 11 Aug 2009 20:28:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63282#M17977</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-11T20:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid argument to function MDY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63283#M17978</link>
      <description>Remember, one or more SAS Diagnostic Statements like PUTLOG (new with SAS 9) are a programmer's best friend!!&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 11 Aug 2009 22:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Invalid-argument-to-function-MDY/m-p/63283#M17978</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-11T22:05:59Z</dc:date>
    </item>
  </channel>
</rss>

