<?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: SAS Macro to parse data by frequency - inexperienced user in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32081#M6178</link>
    <description>Going in a new direction.  Instead of lumping the daily and quarterly data in with the rest, I am creating them separately.  This creates simple haverd.sas and haverw.sas files.&lt;BR /&gt;
&lt;BR /&gt;
Is there a simple SAS program I can run that will read these in and spit them out/save them as .sas7bdat files?  Stat/Transfer won't read the simple .sas files.&lt;BR /&gt;
&lt;BR /&gt;
I'm covering as much ground in the support area myself, not just looking for someone to do my job for me, but I admit being given the code would be faster.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
    <pubDate>Fri, 15 May 2009 15:21:48 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-05-15T15:21:48Z</dc:date>
    <item>
      <title>SAS Macro to parse data by frequency - inexperienced user</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32076#M6173</link>
      <description>Good morning all,&lt;BR /&gt;
&lt;BR /&gt;
Let me start out by letting you know that my SAS experience is minimal at best.  So I need some help altering a macro written a few years ago by someone who left my firm long before I started.&lt;BR /&gt;
&lt;BR /&gt;
Over the past few years we've been running a job (posted below) that takes one somewhat large data file (haver.sas) and parses it into three files based on the frequencies of the data in the file (i.e. it creates three new SAS files - one for annual data, one for quarterly, and one for monthly).&lt;BR /&gt;
&lt;BR /&gt;
I've gotten a request to add weekly and daily data to the original haver.sas file.  So I need to alter the SAS job to also parse and create new files for these data.&lt;BR /&gt;
&lt;BR /&gt;
My first (and really only) thought was to just add two lines of code at the bottom, which were %process(weekly) and %process(daily).  This did not work at all, and in fact caused the whole job to stop working altogether.  So after restoring the affected folders back to the day before I started messing with them, I'm back to square one.&lt;BR /&gt;
&lt;BR /&gt;
Any and all thoughts would be greatly appreciated!  And here is the code:&lt;BR /&gt;
&lt;BR /&gt;
options nocenter;&lt;BR /&gt;
/*...  HAVER.sas is copied from g:\deptdata\research\haver\haver.sas .*/&lt;BR /&gt;
filename haver 'g:\deptdata\research\Haver\dbupd\sashaver\haver.sas';&lt;BR /&gt;
/*...  sas is a directory containing SAS data sets  ..................*/&lt;BR /&gt;
libname  sas   'g:\deptdata\research\Haver\dbupd\sashaver\saslibrary';&lt;BR /&gt;
%macro process(frequency);&lt;BR /&gt;
%*==&amp;gt; This section creates SAS data sets from the Haver data ...........;&lt;BR /&gt;
proc datasource filetype=haver&lt;BR /&gt;
    infile=haver&lt;BR /&gt;
    interval=&amp;amp;frequency&lt;BR /&gt;
    out=sas.&amp;amp;frequency;&lt;BR /&gt;
    run;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%process(annual)&lt;BR /&gt;
%process(quarterly)&lt;BR /&gt;
%process(monthly)</description>
      <pubDate>Thu, 14 May 2009 13:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32076#M6173</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-14T13:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro to parse data by frequency - inexperience user</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32077#M6174</link>
      <description>Have never used this procedure, but if no other ideas, check:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_datasrc_sect006.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_datasrc_sect006.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
So it could be &lt;BR /&gt;
%process (week);&lt;BR /&gt;
%process (day);&lt;BR /&gt;
&lt;BR /&gt;
But it is only a guess, so hopefully somebody with more experience will answer.&lt;BR /&gt;
&lt;BR /&gt;
Good luck with your work!</description>
      <pubDate>Thu, 14 May 2009 14:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32077#M6174</guid>
      <dc:creator>ieva</dc:creator>
      <dc:date>2009-05-14T14:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro to parse data by frequency - inexperienced user</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32078#M6175</link>
      <description>According to the documentation for DATASOURCE, the weekly and daily data are not available for a file from Haver Analytics:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_datasrc_sect051.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_datasrc_sect051.htm&lt;/A&gt;</description>
      <pubDate>Thu, 14 May 2009 14:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32078#M6175</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-05-14T14:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro to parse data by frequency - inexperienced user</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32079#M6176</link>
      <description>Interesting, thanks for the info.  I will check with Haver and see what they suggest.</description>
      <pubDate>Thu, 14 May 2009 15:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32079#M6176</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-14T15:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro to parse data by frequency - inexperienced user</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32080#M6177</link>
      <description>Well Haver was no help.  I tried altering the code from a macro using 'datasource' to using the SASEHAVR engine but that didn't work either.&lt;BR /&gt;
&lt;BR /&gt;
Maybe someone out there happens to work with Haver and can help.  If not, thanks to those who responded and at least pointed me in the right direction.</description>
      <pubDate>Thu, 14 May 2009 18:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32080#M6177</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-14T18:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro to parse data by frequency - inexperienced user</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32081#M6178</link>
      <description>Going in a new direction.  Instead of lumping the daily and quarterly data in with the rest, I am creating them separately.  This creates simple haverd.sas and haverw.sas files.&lt;BR /&gt;
&lt;BR /&gt;
Is there a simple SAS program I can run that will read these in and spit them out/save them as .sas7bdat files?  Stat/Transfer won't read the simple .sas files.&lt;BR /&gt;
&lt;BR /&gt;
I'm covering as much ground in the support area myself, not just looking for someone to do my job for me, but I admit being given the code would be faster.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Fri, 15 May 2009 15:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-to-parse-data-by-frequency-inexperienced-user/m-p/32081#M6178</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-15T15:21:48Z</dc:date>
    </item>
  </channel>
</rss>

