<?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: How to find past data to identify whether the person has work experience in that year in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961527#M374849</link>
    <description>&lt;P&gt;Hello, expert:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first data set mainly records all the work records of a specific person (including work years and work experience).&lt;BR /&gt;The second data set is that the specific person was a member of the board of directors in that year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know whether the particular person had relevant work experience before becoming a board member, which is why the second data set will have more recent years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 10:44:22 GMT</pubDate>
    <dc:creator>shawnchen0321</dc:creator>
    <dc:date>2025-03-11T10:44:22Z</dc:date>
    <item>
      <title>How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961521#M374847</link>
      <description>&lt;P&gt;Hello experts&lt;/P&gt;
&lt;P&gt;I have a dataset (experience) that contains everyone's all work experience, including the start and end years of the job, and whether the job is related to IT majors.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data experience;
input Person$ Startyear Endyear IT_PROFESSION ;
;
cards;
A 2015 2017 0
A 2017 2018 0
A 2019 2019 0
A 2021 2021 0
A 2022 2022 1
A 2023 2023 0
B 2018 2022 1
B 2018 2022 0
B 2023 2023 0
;
/*B works in two different companies at the same time*/ 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In addition, for a dataset (work), I want to combine it with a past dataset (have) to identify whether a person had an IT major before a specific year.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work;
input Person$ YEAR ;
;
cards;
A 2019
A 2023
B 2023
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope it will eventually become the dataset (want).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input Person$ YEAR IT_EXPERTISE;
;
cards;
A 2019 0
A 2023 1
B 2023 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to all the experts.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 10:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961521#M374847</guid>
      <dc:creator>shawnchen0321</dc:creator>
      <dc:date>2025-03-11T10:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961526#M374848</link>
      <description>&lt;P&gt;Please explain the logic used that results in the final data set. The years in data set WORK do not appear to match the years in data set EXPERIENCE for each person.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 10:37:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961526#M374848</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-03-11T10:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961527#M374849</link>
      <description>&lt;P&gt;Hello, expert:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first data set mainly records all the work records of a specific person (including work years and work experience).&lt;BR /&gt;The second data set is that the specific person was a member of the board of directors in that year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know whether the particular person had relevant work experience before becoming a board member, which is why the second data set will have more recent years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 10:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961527#M374849</guid>
      <dc:creator>shawnchen0321</dc:creator>
      <dc:date>2025-03-11T10:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961528#M374850</link>
      <description>&lt;P&gt;Another question:&lt;/P&gt;
&lt;P&gt;Another obs for experience&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;C 2018 2022 1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;and in work&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;C 2024&lt;/LI-CODE&gt;
&lt;P&gt;What is the expected result?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 10:47:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961528#M374850</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2025-03-11T10:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961530#M374852</link>
      <description>&lt;P&gt;Thanks to the experts for pointing out my problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have revised the data set (experience). It should include the following board work experience. If his work at that time was related to IT profession, then it is 1 (IT_PROFESSION).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final data set (want), is that I want to identify whether a particular person had IT work experience before serving as a board member that year (IT_EXPERTISE = 1).&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 11:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961530#M374852</guid>
      <dc:creator>shawnchen0321</dc:creator>
      <dc:date>2025-03-11T11:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961532#M374853</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=experience nway;
    class person;
    var it_profession;
    output out=year(drop=_type_ _freq_) max=max_it_profession maxid(it_profession(startyear))=startyear_it_profession;
run;
data final;
    merge work year;
    by person;
    if year&amp;gt;=startyear_it_profession and max_it_profession=1 then it_expertise=1;
    else it_expertise=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Mar 2025 11:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961532#M374853</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-03-11T11:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to find past data to identify whether the person has work experience in that year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961549#M374858</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; Amazing, the code worked. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 13:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-past-data-to-identify-whether-the-person-has-work/m-p/961549#M374858</guid>
      <dc:creator>shawnchen0321</dc:creator>
      <dc:date>2025-03-11T13:52:00Z</dc:date>
    </item>
  </channel>
</rss>

