× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



IBM's date window for 2 digit years is just defined that way. You may be
stuck with prepending a century on your years.   

I'm assuming 8 digit dates mean a four position year.  You could use date
arithmetic in RPGIV.  Convert the numeric dates into date fields and
subtract them from the current date as in the following.

0004.00 Dbirthday         s               d   inz(d'1917-11-23') 
0005.00 Dcurdate          s               d   inz(*sys)          
0006.00 Dage              s              5u 0  
0044.00 C     curdate       subdur    birthday      age : *Y 

If v3r2 is like v3r1, you probably need to format the numeric dates as
character strings with separators to move them into date fields e.g.
19990326 --> 1999-03-26.  

-----Original Message-----
From: KeatonDana@aol.com [mailto:KeatonDana@aol.com]
Sent: Friday, March 26, 1999 8:43 AM
To: MIDRANGE-L@midrange.com
Subject: Determining Age


I wrote a routine that i call and pass 8 digit dates to,  this calculates
the
age of an individual.  I take the passed date and convert it to julian and
take todays date and also convert this to julian.  I then calculate the age
by
substringing out the first 2 digits and subtracting them.  I then use the
day
portion of the julian date and calculate days so that i can modify the age
in
necessary.  My question is that IBM only supports  4 digit dates upto and
including 8/4/1928.  But most of the patients DOB are prior to this and I
don't want to write a second routine.  I've been converting the DOB and all
dates to the mmddyyyy format but have run into this problem.  I'm on R3M2
and
wonder if other dates are supported if I move to a new release?  Or hey if
anyone can come up with a better idea I'm open to any input.  Thanks in
advance..

Dana Keaton 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.