RDi shouldn't care if your "field" field is *usa, *iso, etc.
You can compare a *iso date field to a *ymd date field. They're both date fields and RPG does the conversion.
I just did this and RDi didn't care:
dcl-s field date( *ymd );
if field = d'0001-01-01';
EndIf;
Can you reproduce the issue in a small piece of code that you can share?
I'm at RDi 9.1.1.1 (one more .1 than you mentioned) so that could be a difference.
Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform
-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark Murphy/STAR BASE Consulting Inc.
Sent: Wednesday, June 10, 2015 10:01 AM
To: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries
Subject: [WDSCI-L] Date literal not valid
I am getting a validation error within RDi 9.1.1. The following code gives RNF0305E, RNF0604E, and RNF0637E:
if field = d'0001-01-01';
...
endif;
This code compiles fine as I have defined ctl-opt DatFmt(*ISO); but it appears that RDi does not recognize that. In fact if I change it to:
if field = d'0001/01/01';
...
endif;
The RDi errors go away, but the compile fails.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.