<?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 Calculate Retirement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753427#M237454</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here i want employee retirement date from date_of_birth&amp;nbsp; below find attachment of employee excel sheet&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="/home/u35263349/My_Folder/Employee_Details.xlsx"
out=employee_info
dbms=xlsx;
quit;

data ds;
set employee_info;
if  emp_dob &amp;gt;=60 then output;
proc print;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Jul 2021 06:28:01 GMT</pubDate>
    <dc:creator>BrahmanandaRao</dc:creator>
    <dc:date>2021-07-12T06:28:01Z</dc:date>
    <item>
      <title>Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753427#M237454</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here i want employee retirement date from date_of_birth&amp;nbsp; below find attachment of employee excel sheet&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="/home/u35263349/My_Folder/Employee_Details.xlsx"
out=employee_info
dbms=xlsx;
quit;

data ds;
set employee_info;
if  emp_dob &amp;gt;=60 then output;
proc print;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jul 2021 06:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753427#M237454</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-07-12T06:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753429#M237455</link>
      <description>&lt;P&gt;There are some minor problems with your code:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;proc import ends with run; not with quit; - wasn't there a note in the log about this?&lt;/LI&gt;
&lt;LI&gt;you are missing a run-statement at the end of the data-step.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;What is emp_dob? If it is the date of birth, and was correctly read by sas, then use function intck to calculate the age in years.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 06:54:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753429#M237455</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-12T06:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753493#M237496</link>
      <description>Please give solution</description>
      <pubDate>Mon, 12 Jul 2021 13:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753493#M237496</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-07-12T13:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753512#M237502</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here i want employee retirement date from date_of_birth&amp;nbsp; below find attachment of employee excel sheet&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="/home/u35263349/My_Folder/Employee_Details.xlsx"
out=employee_info
dbms=xlsx;
quit;

data ds;
set employee_info;
if  emp_dob &amp;gt;=60 then output;
proc print;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rule(s) for creating the retirement date are what exactly?&lt;/P&gt;
&lt;P&gt;Here is an example of incrementing a DOB to a date 40 years later.&lt;/P&gt;
&lt;PRE&gt;data example;
   dob = '15Mar1955'd;
   retiredate= intnx('year',dob,40,'s');
   format dob retiredate date9.;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jul 2021 14:49:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753512#M237502</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-12T14:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753657#M237572</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Please give solution&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As long as you don't invest the time to provide data in usable form -&amp;nbsp; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; explained why posting excel files is not posting data - i can't provide any code, because i would have to make to many assumptions about types and values in your data, it is most likely that the code would not work with your data at all. Besides i mentioned the function intck, the docs have an example, you should be able to adept that to your needs. Maybe it is not the right function to use, but that depends on the data you have and what you are trying to achieve. Since you have not shown us the expected result, we play another guessing game.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 05:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753657#M237572</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-13T05:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753745#M237612</link>
      <description>data emp;&lt;BR /&gt;input EMP_CODE 1-5	EMP_NAME $7-14	EMP_DOB 17-26	EMP_DATE_OF_JOINING 27-35	EMP_DESIGNATION $ &lt;BR /&gt;&amp;amp; 37-57	EMP_CITY $	62-69 EMP_MOBILE 72-79;&lt;BR /&gt;informat EMP_DOB DATE9. EMP_DATE_OF_JOINING DATE9.;&lt;BR /&gt;format EMP_DOB DATE9. EMP_DATE_OF_JOINING DATE9.;&lt;BR /&gt;datalines;&lt;BR /&gt;51123	Angela	  22/07/1968	22/05/1990	Manager	                  Mumbai	984511126&lt;BR /&gt;51124	Bonnie	  02/02/1948	10/11/1994	Clerk	                  Kolkota	984511127&lt;BR /&gt;51125	Frank	  24/11/1971	02/02/1980	Marketing Coordinator	  Mumbai	984510178&lt;BR /&gt;51126	Joe	      01/09/1966	05/05/1990	Medical Assistant	      Chennai	984516121&lt;BR /&gt;51127	Kimberly  26/04/1955	25/07/1990	Web Designer	          Chennai	984515170&lt;BR /&gt;51128	Lisa	  27/07/1977	22/04/1990	Dog Trainer	              Jaipur	984511131&lt;BR /&gt;51129	Michael	  02/09/1954	04/04/1993	President of Sales	      Mumbai	984512130&lt;BR /&gt;51130	Patrick	  09/07/1947	05/08/1992	Nursing Assistant	      Chennai	984513133&lt;BR /&gt;51131	Rose	  03/11/1949	06/09/1997	Project Manager	          Jaipur	984511139&lt;BR /&gt;51132	Todd	  31/07/1970	20/01/1994	Librarian	              Hyderabad	984519135&lt;BR /&gt;51133	Jhon	  01/08/1975	22/10/1999	Project Manager	          Hyderabad	984511136&lt;BR /&gt;51134	Smith	  02/08/1968	24/12/1996	Account Executive	      Kolkota	984511237&lt;BR /&gt;;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jul 2021 11:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/753745#M237612</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-07-13T11:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/754018#M237712</link>
      <description>&lt;P&gt;Have you tested the code?&lt;/P&gt;
&lt;P&gt;Logs says&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid data for EMP_DOB in line 33 17-26.
NOTE: Invalid data for EMP_DATE_OF_JOINING in line 33 27-35.
REGEL:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                     
33         51123 Angela 22/07/1968 22/05/1990 Manager Mumbai 984511126
EMP_CODE=51123 EMP_NAME=Angela 2 EMP_DOB=. EMP_DATE_OF_JOINING=. EMP_DESIGNATION=anager Mumbai 9845111 EMP_CITY=  EMP_MOBILE=.
_ERROR_=1 _N_=1
&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jul 2021 09:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/754018#M237712</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-14T09:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Retirement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/754131#M237760</link>
      <description>&lt;P&gt;And still no rule(s) for how to actually calculate retirement or show the result.&lt;/P&gt;
&lt;P&gt;Some simple POSSIBLE rules:&lt;/P&gt;
&lt;P&gt;At a specific calendar age. Show the data that age occurs. Or number of days or weeks or months or years until it occurs.&lt;/P&gt;
&lt;P&gt;A specific number of years employed. Show the date that occurs on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My retirement agency has something they call "Rule 90" for "full retirement benefits". Which is calculated as the date the Number of Years of Service (employed) plus calendar age in years = 90. Not a trivial exercise in programming; not horribly difficult but since you have to simultaneously increment two sets of dates, age and years of employment, not a one line code solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, what would be &lt;STRONG&gt;your&lt;/STRONG&gt; rule for calculating retirement and how do you want the solution to show?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 17:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-Retirement/m-p/754131#M237760</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-14T17:12:00Z</dc:date>
    </item>
  </channel>
</rss>

