× 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.


  • Subject: Dates
  • From: CVWD@xxxxxxx
  • Date: Thu, 11 Sep 1997 11:54:28 -0400 (EDT)

Bob Cozzi writes:

> Define a constant called NULL_DATE.
> Then you could do
> D NULL_DATE        C                          Const(D'0001/01/01')
> C            IF    myDate = NULL_DATE
> C            /* do my null-date routine here */
> C            endif

We use *loval for that.  When the date is not known for update, we move
*loval where we used to move *zero.  When checking for invalid dates, we
check for *loval where we used to check for *zero.  Since we stored dates in
yymmdd format, we always had to convert them to mmddyy for display or
printing, so the fact that you have to move date data types to another field
for display or printing makes no difference to us (although it would be nice
not to have to sometimes).  Overall, date data types do not change any
program logic for us and are no harder to use.  Any slow down in file access
(we have not measured any) is compensated for by not having exteral program
calls to routines for date validation, date comparison, duration
calculations, etc.  I know *null is the right way to do this, and it is
really no harder, but we set the standard before RPG could handle null dates
and we have not revisited the subject yet.  Maybe when we go to V4r2.  Lance.
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| 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.