|
When doing initialization you are specifying a date literal in the INZ keyword. This is correct. But what you're not considering is that all date literal in the source member (and "all" means "all) must be in the date format specified on the DATFMT keyword of the Header specification. This is one of these most common mistakes people make; they specify the INZ (initial value) in the same format as the DATFMT keyword of the date variable. But is must be in the same format as the Header specification indicates. Bob Cozzi Cozzi Consulting www.rpgiv.com -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Paramasivam Murugesan , Gurgaon Sent: Monday, July 07, 2003 2:24 AM To: rpg400-l@xxxxxxxxxxxx Subject: INZ the Date Variable Hi all, In RPG cycle, at What point of time, the Initialization of variables take place? The DATFMT keyword in D spec overrides the DATFMT Keyword in H spec. I believe i am right. If the date variable DAT1 is initialized with a valid date value and it has the format specified in the D spec. I know, the DATFMT keyword specified in the D spec will have the effect on that date variable in the calculation time. but, I dont understand, why the compiler does not consider the DATFMT keyword in D spec while doing initialization. 0000.40 1 H DATFMT(*ISO) 0000.41 2 D DAT1 S D DATFMT(*MDY)INZ(D'07/25/03') 0000.42 ======>a 0000.43 ======>bbbbbbbbbbb 0000.44 *RNF0305 20 a 000100 The value D'07/25/03' is not a valid *ISO- Date literal. 0000.45 *RNF3492 20 b 000100 Initialization value D'0001-01-01' for field DAT1 is not in 0000.46 years 1940 - 2039. Any idea? Thanks in advance Murugesh _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-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.