|
I see your point...however if I set DATFMT to *MDY for the program I can STILL define a date field with DATFMT(*ISO)... Since the date field in the DSPF is defined as *MDY why SHOULD the program date format override the file definition....???? Thanks, Tommy Holden -----Original Message----- From: Jon Paris [mailto:Jon.Paris@xxxxxxxxxxxxxx] Sent: Friday, January 28, 2005 1:02 PM To: rpg400-l@xxxxxxxxxxxx Subject: RE: Why RPG IV ..... >> sounds reasonable that if the date field is defined with a date >> format that the RPG compiler SHOULD keep the date format... And it will - if you follow the rules. 1) If the field is explicitly defined in a DS in the program the format is honored. So using an externally described DS (or LIKEREC definition) based on the screen will do the job. 2) If that isn't possible, by default the format of a date is changed to the default for the program - so if all dates are *MDY then DatFmt(*MDY) on the H spec will do the job. A DCR will do no good. The design has worked this way since the first release of RPG IV. I don't happen to like it, but was modeled on the behavior of numeric fields (always converted to packed except as noted at 1) above) and will not change now. It would cause too many incompatibilities. Jon Paris Partner400 www.Partner400.com -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.