<?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: Date Informat not found in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605393#M8300</link>
    <description>&lt;P&gt;Is this your entire code? And you get the same error when you comment the format statement out?&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 13:39:14 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-11-19T13:39:14Z</dc:date>
    <item>
      <title>Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605390#M8298</link>
      <description>&lt;P&gt;Hi. I am new to DI Studio (4.902). I transferred some code from EG which involves the mmyys7. format, since I&lt;/P&gt;&lt;P&gt;am grouping data by month/year.&lt;/P&gt;&lt;P&gt;I keep getting the "informat MMYYS was not found or could not be located" error. My previous Extract/Join steps&lt;/P&gt;&lt;P&gt;all used this format successfully. I am not sure why User Written Code would be different? The informat is not in the&amp;nbsp;&lt;/P&gt;&lt;P&gt;user code at all (I have included the failing code and some of the built-in code below).&lt;/P&gt;&lt;P&gt;Thanks for any advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1801&lt;BR /&gt;1802 data FILL_IN_ALL_DATEROWS(drop=rc);&lt;BR /&gt;1803&lt;BR /&gt;1804 declare hash h(dataset:'TEMP_ALLTABLE');&lt;BR /&gt;1805 h.definekey( 'COUNTRY_NAME', 'CONNECT_MONTH' );&lt;BR /&gt;1806 h.definedata('COUNT_CONNECT_MONTHS_COUNTRY');&lt;BR /&gt;1807 h.definedone();&lt;BR /&gt;1808&lt;BR /&gt;1809 set TEMP_ALLTABLE ;/*set WORK.JOIN_UPNUMDEFS_TC_LIVESN;*/&lt;BR /&gt;1810 by COUNTRY_NAME CONNECT_MONTH;&lt;BR /&gt;1811&lt;BR /&gt;1812 if first.COUNTRY_NAME then do;&lt;BR /&gt;1813 CONNECT_MONTH='01oct2017'd; /* starting MY */&lt;BR /&gt;1814 do until (CONNECT_MONTH=intnx('month', today(), 0, 'b')); /* was -1 */&lt;BR /&gt;1815 COUNT_CONNECT_MONTHS_COUNTRY=0;&lt;BR /&gt;1816 rc=h.find();&lt;BR /&gt;1817 output;&lt;BR /&gt;1818 CONNECT_MONTH=intnx('month', CONNECT_MONTH, 1, 'b');&lt;BR /&gt;1819 end;&lt;BR /&gt;1820 end;&lt;BR /&gt;1821 /* format CONNECT_MONTH mmyys7.;*/ &lt;FONT color="#0000FF"&gt;same with or without commenting out......&lt;/FONT&gt;&lt;BR /&gt;1822 run;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: The informat MMYYS was not found or could not be loaded.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1709 %let _OUTPUT_col2_name = "CONNECT_MONTH"n;&lt;BR /&gt;1710 %let _OUTPUT_col2_table = work."W7RQJ432"n;&lt;BR /&gt;1711 %let _OUTPUT_col2_length = 8;&lt;BR /&gt;1712 %let _OUTPUT_col2_type = ;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;1713 %let _OUTPUT_col2_format = mmyys7.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;1714 %let _OUTPUT_col2_informat = mmyys7.;&lt;/FONT&gt;&lt;BR /&gt;1715 %let _OUTPUT_col2_label = %nrquote(CONNECT_MONTH);&lt;BR /&gt;1716 %let _OUTPUT_col2_input0 = "CONNECT_MONTH"n;&lt;BR /&gt;1717 %let _OUTPUT_col2_exp = ;&lt;BR /&gt;1718 %let _OUTPUT_col2_input = "CONNECT_MONTH"n;&lt;BR /&gt;1719 %let _OUTPUT_col2_input_count = 1;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605390#M8298</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-11-19T13:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605392#M8299</link>
      <description>&lt;P&gt;Informat MMYYS does not exist. I don't know why you state it worked previously, but here is a list of all possible Informats, and there is no MMYYS&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=allprodslang&amp;amp;docsetTarget=syntaxByType-informat.htm&amp;amp;locale=en#p0unvzltcs191nn1ow0qhrohknz0"&gt;https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=allprodslang&amp;amp;docsetTarget=syntaxByType-informat.htm&amp;amp;locale=en#p0unvzltcs191nn1ow0qhrohknz0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format MMYYS does exist, but that doesn't mean you can use it as an Informat.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:39:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605392#M8299</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-19T13:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605393#M8300</link>
      <description>&lt;P&gt;Is this your entire code? And you get the same error when you comment the format statement out?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605393#M8300</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-19T13:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605402#M8301</link>
      <description>&lt;P&gt;The code is syntactically correct, but has a flaw:&lt;/P&gt;
&lt;PRE&gt;37         data temp_alltable;
38         input country_name $ connect_month :date9. count_connect_months_country;
39         format connect_month mmyys7.;
40         datalines;

NOTE: The data set WORK.TEMP_ALLTABLE has 2 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
43         ;

44         
45         data FILL_IN_ALL_DATEROWS(drop=rc);
46         
47         declare hash h(dataset:'TEMP_ALLTABLE');
48         h.definekey( 'COUNTRY_NAME', 'CONNECT_MONTH' );
49         h.definedata('COUNT_CONNECT_MONTHS_COUNTRY');
50         h.definedone();
51         
2                                                          Das SAS System                           07:43 Tuesday, November 19, 2019

52         set TEMP_ALLTABLE ;/*set WORK.JOIN_UPNUMDEFS_TC_LIVESN;*/
53         by COUNTRY_NAME CONNECT_MONTH;
54         
55         if first.COUNTRY_NAME then do;
56           CONNECT_MONTH='01oct2017'd; /* starting MY */
57           do until (CONNECT_MONTH=intnx('month', today(), 0, 'b')); /* was -1 */
58             COUNT_CONNECT_MONTHS_COUNTRY=0;
59             rc=h.find();
60             output;
61             CONNECT_MONTH=intnx('month', CONNECT_MONTH, 1, 'b');
62           end;
63         end;
64         format CONNECT_MONTH mmyys7.;
65         run;

NOTE: There were 2 observations read from the data set WORK.TEMP_ALLTABLE.
NOTE: There were 2 observations read from the data set WORK.TEMP_ALLTABLE.
NOTE: There were 2 observations read from the data set WORK.TEMP_ALLTABLE.
NOTE: There were 2 observations read from the data set WORK.TEMP_ALLTABLE.
NOTE: The data set WORK.FILL_IN_ALL_DATEROWS has 50 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;As you can see in the log, the hash object is recreated for every observation, and that causes a memory leak in my experience; you should only create it once at _N_ = 1:&lt;/P&gt;
&lt;PRE&gt;45         data FILL_IN_ALL_DATEROWS(drop=rc);
46         if _N_ = 1
47         then do;
48           declare hash h(dataset:'TEMP_ALLTABLE');
49           h.definekey( 'COUNTRY_NAME', 'CONNECT_MONTH' );
50           h.definedata('COUNT_CONNECT_MONTHS_COUNTRY');
51           h.definedone();
52         end;
53         set TEMP_ALLTABLE ;/*set WORK.JOIN_UPNUMDEFS_TC_LIVESN;*/
54         by COUNTRY_NAME CONNECT_MONTH;
55         if first.COUNTRY_NAME then do;
56           CONNECT_MONTH='01oct2017'd; /* starting MY */
57           do until (CONNECT_MONTH=intnx('month', today(), 0, 'b')); /* was -1 */
58             COUNT_CONNECT_MONTHS_COUNTRY=0;
59             rc=h.find();
60             output;
61             CONNECT_MONTH=intnx('month', CONNECT_MONTH, 1, 'b');
62           end;
63         end;
64         format CONNECT_MONTH mmyys7.;
65         run;

NOTE: There were 2 observations read from the data set WORK.TEMP_ALLTABLE.
NOTE: There were 2 observations read from the data set WORK.TEMP_ALLTABLE.
NOTE: The data set WORK.FILL_IN_ALL_DATEROWS has 50 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;Now the table is read once to populate the hash, and a second time for the main data step loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605402#M8301</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-19T14:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605404#M8302</link>
      <description>&lt;P&gt;Yes I get the same error whether or not that format statement is commented out.&lt;/P&gt;&lt;P&gt;And the "mmyys7." gives me no error in other Join or Extract steps in the Mapping,&lt;/P&gt;&lt;P&gt;either in the format or informat fields. Does that make sense to you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do need to group by month/year (able to be sorted as a date) so if its a particular informat sensitivity in User Written Code,&lt;/P&gt;&lt;P&gt;should I take the long way around and&lt;/P&gt;&lt;P&gt;do Month, Year, concatenate, convert mm/yyyy back to Date type?&lt;/P&gt;&lt;P&gt;(I can't believe SAS wouldn't have that particular (in)format :-/).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605404#M8302</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-11-19T14:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605406#M8303</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268817"&gt;@crawfe&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes I get the same error whether or not that format statement is commented out.&lt;/P&gt;
&lt;P&gt;And the "mmyys7." gives me no error in other Join or Extract steps in the Mapping,&lt;/P&gt;
&lt;P&gt;either in the format or informat fields. Does that make sense to you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do need to group by month/year (able to be sorted as a date) so if its a particular informat sensitivity in User Written Code,&lt;/P&gt;
&lt;P&gt;should I take the long way around and&lt;/P&gt;
&lt;P&gt;do Month, Year, concatenate, convert mm/yyyy back to Date type?&lt;/P&gt;
&lt;P&gt;(I can't believe SAS wouldn't have that particular (in)format :-/).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS does have the MMYYS format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does not have the MMYYS informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need an informat to read data that appears as mm/yy (example: 02/17), you can use the ANYDTDTE informat.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:40:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605406#M8303</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-19T14:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605407#M8304</link>
      <description>&lt;P&gt;Re: the HASH fix; thanks! that code is really at the limit of my experience/knowledge.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605407#M8304</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-11-19T14:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date Informat not found</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605413#M8305</link>
      <description>&lt;P&gt;Thanks! I kept the format mmyys7. but used the anydtdte7. informat on both the Source and Target&lt;/P&gt;&lt;P&gt;tables and it worked. (and I improved my Hash code).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 14:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-Informat-not-found/m-p/605413#M8305</guid>
      <dc:creator>crawfe</dc:creator>
      <dc:date>2019-11-19T14:54:58Z</dc:date>
    </item>
  </channel>
</rss>

