<?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: First and Last occurrence in a dataset in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367171#M11078</link>
    <description>&lt;P&gt;I'm not sure if this would be more efficient but it would probably work and be easy to understand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't cross states I would process each state individually and append all of those, sort them, identify first/last per firm as your rules and then loop....I don't know if this would be efficient in terms of processing time but I suspect it's the easiest to program.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use Call EXECUTE to call the macro 50 times, once for each State.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a sketch of the idea. I'm sure others will have more efficient solutions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro firm_start(state_abbr=);

data have; 
set &amp;amp;state_abbr.:;
run;

*sort by firm;
proc sort data=have;
by firmID &amp;lt;date variable&amp;gt;;
run;

*rules to identify first;
data processed;
set have;

run;

*append to master;
proc append base=master data=processed;
run;

*clean up;
proc datasets lib=work nodetails nolist;
delete processed;
run; quit;

%mend;





&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 14 Jun 2017 23:05:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-06-14T23:05:39Z</dc:date>
    <item>
      <title>First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367155#M11072</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have data on employment in each firm in each quarter from 1990 to 2010. The data is organized by individual SAS files for each state in the US in each quarter. So for instance the file AK19901 contains employment data (variable &lt;STRONG&gt;EMP&lt;/STRONG&gt;) on all firms (each firm has a &lt;STRONG&gt;FIRMID&lt;/STRONG&gt;) in Alaska (variable &lt;STRONG&gt;STATE&lt;/STRONG&gt; takes value&amp;nbsp;AK) in 1990 in quarter1 (variable &lt;STRONG&gt;YR_QTR&lt;/STRONG&gt; is 19901). Each of the file names &amp;nbsp;has the following format - 2 letter state code, year and quarternumber (e.g. AK19901 AK19902 AK19903,....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the above, I want to create a dataset with just one observation per firm with the following 3 variables: &amp;nbsp;&lt;STRONG&gt;FIRMID ENTRYDATE EXITDATE&lt;/STRONG&gt; where&lt;/P&gt;
&lt;P&gt;- ENTRYDATE is the first YR_QTR of positive employment (EMP &amp;gt;0) and&lt;/P&gt;
&lt;P&gt;- EXITDATE is the last YR_QTR of positive employment&lt;SPAN&gt;&amp;nbsp;(EMP &amp;gt;0)&lt;/SPAN&gt; followed by four quarters where EMP is 0.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I go about doing this without pooling all the years of data for a firm? (There are over a million firms so I am running short of memory). For instance,&amp;nbsp;if I could pool only two years first&amp;nbsp;and calculate ENTRY and EXIT and then&amp;nbsp;do a rolling two year window to get all the firms?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate any programming tips you could provide me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dana&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 22:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367155#M11072</guid>
      <dc:creator>dshills</dc:creator>
      <dc:date>2017-06-14T22:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367157#M11073</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/53220"&gt;@dshills&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Please provide data steps creating sample data and also show us the desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions:&lt;/P&gt;
&lt;P&gt;1. You want employment data so wouldn't you need 4 variables?&amp;nbsp;FIRMID &lt;STRONG&gt;EMPID&lt;/STRONG&gt; ENTRYDATE EXITDATE&lt;/P&gt;
&lt;P&gt;2. Can the same FIRMID be in more than one state?&lt;/P&gt;
&lt;P&gt;3. If FIRMID can be in more than one state: Is it possible that an employee changes the state and appears in the same quarter in two state SAS files for the same firm?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....and such questions are the reason why you have to provide representative sample data and desired output.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 22:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367157#M11073</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-06-14T22:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367159#M11074</link>
      <description>&lt;P&gt;Memory shouldn't be an issue here. How big are your starting datasets and where are you running out of memory? In a sort?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 22:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367159#M11074</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-14T22:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367165#M11075</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thank you. Please see below:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions:&lt;/P&gt;
&lt;P&gt;1. You want employment data so wouldn't you need 4 variables?&amp;nbsp;FIRMID &lt;STRONG&gt;EMPID&lt;/STRONG&gt; ENTRYDATE EXITDATE&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;****No I am just using EMP to determine ENTRYDATE and EXITDATE. So I could do without EMP in the final dataset.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Can the same FIRMID be in more than one state?&lt;/P&gt;
&lt;P&gt;**** &lt;STRONG&gt;No&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. If FIRMID can be in more than one state: Is it possible that an employee changes the state and appears in the same quarter in two state SAS files for the same firm?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;**** &lt;STRONG&gt;N/A&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;....and such questions are the reason why you have to provide representative sample data and desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Representative Sample Data - Assume I have data from 19901-19905. I am&amp;nbsp;showing pooled data so I dont have to show &amp;nbsp;data in individual files. The variable SOURCEFILE below is just for illustration and indicates which file the observation comes from.&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="365"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D&gt;AK19905&lt;/TD&gt;
&lt;TD&gt;AK&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;19905&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;AK19905&lt;/TD&gt;
&lt;TD&gt;AK&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;19905&lt;/TD&gt;
&lt;TD&gt;85&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DESIRED OUTPUT&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="764"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;FIRMID&lt;/TD&gt;
&lt;TD width="81"&gt;ENTRYDATE&lt;/TD&gt;
&lt;TD width="81"&gt;EXITDATE&lt;/TD&gt;
&lt;TD width="538"&gt;COMMENT (For reference only)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;19902&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD width="538"&gt;First date of positive employment is 19902. Last date is not known so EXIT takes 0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;19901&lt;/TD&gt;
&lt;TD&gt;19901&lt;/TD&gt;
&lt;TD width="538"&gt;Start of sample period in the data is 19901 so entry date takes that value. (Even though entry could have occurred prior to 19901). Thereafter there are 4 quarters of 0 employment so EXIT is also 19901&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;19901&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD width="538"&gt;Start of sample period in the data is 19901 so entry date takes that value. (Even though entry could have occurred prior to 19901). While the firm seems to have exited in 19902, there are only 3 quarters of 0 employment after that so EXITDATE is 0.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;19903&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD width="538"&gt;First date of positive employment is 19903. Last date is not known so EXIT takes 0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;19901&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD width="538"&gt;First date of positive employment is 19902. Firm is no longer there after 19902 but we don’t have the 4 quarters of 0 employment so EXIT takes 0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Hope this clarifies the question. Thanks&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 22:43:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367165#M11075</guid>
      <dc:creator>dshills</dc:creator>
      <dc:date>2017-06-14T22:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367167#M11076</link>
      <description>&lt;P&gt;The individual files range from 2 MB to 250MB. Sorry I&amp;nbsp;misuse the term "memory". I am operating on a shared server space and the administrator is complaining that I am taking up too much space. So I was trying to see if there was some way of doing this without creating a pooled dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 22:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367167#M11076</guid>
      <dc:creator>dshills</dc:creator>
      <dc:date>2017-06-14T22:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367171#M11078</link>
      <description>&lt;P&gt;I'm not sure if this would be more efficient but it would probably work and be easy to understand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't cross states I would process each state individually and append all of those, sort them, identify first/last per firm as your rules and then loop....I don't know if this would be efficient in terms of processing time but I suspect it's the easiest to program.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use Call EXECUTE to call the macro 50 times, once for each State.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a sketch of the idea. I'm sure others will have more efficient solutions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro firm_start(state_abbr=);

data have; 
set &amp;amp;state_abbr.:;
run;

*sort by firm;
proc sort data=have;
by firmID &amp;lt;date variable&amp;gt;;
run;

*rules to identify first;
data processed;
set have;

run;

*append to master;
proc append base=master data=processed;
run;

*clean up;
proc datasets lib=work nodetails nolist;
delete processed;
run; quit;

%mend;





&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jun 2017 23:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/367171#M11078</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-14T23:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last occurrence in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/368820#M11133</link>
      <description>&lt;P&gt;Thank you Reeza. This works well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone help me with figuring out how to code the EXITDATE.&lt;SPAN&gt;&amp;nbsp;EXITDATE is the last YR_QTR of positive employment&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(EMP &amp;gt;0)&lt;/SPAN&gt;&lt;SPAN&gt; followed by four quarters where EMP is 0.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 16:42:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/First-and-Last-occurrence-in-a-dataset/m-p/368820#M11133</guid>
      <dc:creator>dshills</dc:creator>
      <dc:date>2017-06-20T16:42:08Z</dc:date>
    </item>
  </channel>
</rss>

