|
How about If myRealDateField = *NULL Or better yet. If %NAD(myRealDateField) Anyway, I don't really care about this dead horse of *NULLID, I don't use them anyway. The problem/point is that 1776-07-04 should 'fit' in ANY date field of any external format. Then the system give a soft "can't display date in this format" message. Instead we get a runtime error when we try to move that date into a *MDY date data-type field. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx Sent: Monday, January 31, 2005 10:33 AM To: RPG programming on the AS400 / iSeries Subject: RE: Why RPG IV ... Bob, Currently there is nothing stopping you from using a numeric or character variable from being manipulated even if it is at an "understood" initial point, like *loval. So how is the fact that you can modify a null date (or any other field) any different than the fact that you can modify a *loval numeric or character? So how is: If MyChar=*loval; // Initialized Endif; any better than If %nullind(MyDate); // Initialized Endif; Would it be better if the compiler team generated an error if you did not check the %nullind? For example, should MyDate += %days(5); generate an error if %nullind(MyDate) is *on, much like failure to check %parms, or %addr, of a field cause an error if you try to manipulate a field that wasn't passed? I also think that %nullind support should be added to work fields. Currently it is only available on DB fields. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Bob Cozzi" <cozzi@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 01/28/2005 03:59 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> cc Subject RE: Why RPG IV Sucks LOL! If %NULLIND(Date) = *ON // Your date is meaningless! /endif One issue with this approach is that nobody understands it, it isn't well known, and it is virtually never used. Also even if the null indicator for the DATE field is *ON, you can still use that field without restriction. That is no notification is sent if you now move or multiply that null date with another field. Why? Because the null indicatory is separate from the data. Not a good solution at all in my view. -Bob -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx Sent: Friday, January 28, 2005 2:18 PM To: RPG programming on the AS400 / iSeries Subject: RE: Why RPG IV Sucks Sure they do Bob. It's called Null support. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Bob Cozzi" <cozzi@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 01/28/2005 02:59 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> cc Subject RE: Why RPG IV Sucks I would expect a *MDY date value to be able to hold Jan 1, 0001 just like *ISO does. Under the covers they are all the same date values. So the valid date range should NOT have been restricted based on format (this is not a RPG issue, however). Instead, the date fields, when viewed, should issue a "Date out of range for format" but continue to be usable by code for date math and for moving to *ISO and non-*ISO format dates. Sure date's should have a "zero-like" value or *LOVAL equivalent, but sadly they don't. -Bob -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of joe Sent: Friday, January 28, 2005 1:23 PM To: RPG programming on the AS400 / iSeries; RPGIV@xxxxxxxxxxxxxxx Subject: Re: Why RPG IV Sucks It would be nice if at run time the system could recognize *loval equalivence between different date formats and convert accordingly. If I move a *ISO *loval to *MDY field I would expect a *MDY *loval of 01/01/40 from 0001-01-01. joeM ----- Original Message ----- From: "Bob Cozzi" <cozzi@xxxxxxxxx> To: <RPGIV@xxxxxxxxxxxxxxx>; "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> Sent: Friday, January 28, 2005 11:47 AM Subject: Why RPG IV Sucks > Okay maybe I'm a bit cranky. > > Scenario: > > DSPF DDS contains a date field with DATFMT(*MDY) > > Compiled RPG IV that uses that display file is called. > Write to the display file with that date field, BOOM! > Why? > Because the RPG IV converts the date from the display file into *ISO within > the program. > RPG IV also initializes date fields in *ISO format to D'0001-01-01' > This date however is NOT valid for *MDY so I end up wth: > RNQ0114 - Message . . . . : The year portion of a Date or Timestamp value > is not in the correct range (C G D F). > > -Bob > > > -- > 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. > -- 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. -- 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. -- 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. -- 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. -- 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-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.