I included in my original post the line of code where the host variable was
being populated, but it was buried in a paragraph.

Here it is...

FCODateLo = %date();
FCODateHi = %date();
FCOBEGDAT = %date();
FCOBEGTIM = %time();
FCOENDDAT = %date();
FCOENDTIM = %time();

Not that FCODateLo and FCODateHI are specified as datfmt(*iso) in the DDS,
while FCOBEGDAT and FCOENDDAT are specified as (*USA) in the DDS. Thgis
problem only showed up when I inserted the FCODateLo and FCODateHi fields
into the DDS and programn logic. That is, SQL had no problem with the *USA
fields.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Luis Rodriguez
Sent: Monday, July 09, 2012 4:17 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL0180 on SQL insert

Thomas,

Mmmm, %DATE should always return your date in *ISO format. What varies is
how you specify your INPUT date. As I see it, the safest way is to always
specify your input format so, if your input dates are in the *MDY format,
use %DATE(RPG_DATE:*MDY), if using *ISO, use %DATE(RPG_DATE:*ISO), etc.

If nout using date separators (assuming you are converting, say '123112',
rememember to append a '0' to the format., eg. :*MDY0

Can you send us the code line(s) where you are using your %DATE
statement(s).

Regards,


If your dates aren't
Luis Rodriguez
IBM Certified Systems Expert - eServer i5 iSeries

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.