× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I got the embedded statements to work. However, I can't get the date
format option changed in the compile. When I do:

CHGCMDDFT CMD(CRTSQLRPGI) NEWDFT(DATFMT(*ISO))

I get a message saying "Errors detected while changing defaults". Anyone
see what I'm typing wrong?


Jim


On Sat, Jul 19, 2014 at 10:03 AM, James Newman, CDP <newmanas400@xxxxxxxxx>
wrote:

I have the following code in an RPG ILE program:

/EXEC SQL
+ DECLARE C1 CURSOR FOR
+ SELECT MIN(HIDATE)
+ FROM MHIST
/END-EXEC

FWIW, all my date fields are ISO (YYYY-MM-DD).

The program was blowing up when I tried to move the result to another date
field, saying I had an invalid date. I looked at the dump and the date
field contained "++++++++++".

I did STRSQL, ran the command, and got the same thing. I used Query and
it shows the minimum (oldest) date as "1915-01-05". Ran the SQL version
again but this time didn't ask for MIN. Instead asked to see the data and
sorted by date. All the dates prior to 1940-01-01 are "++++++++++".

I know I can sort the records by date, SETLL, and READ but I figured this
would be faster and more efficient.

Is there a "Yes, I really have data before 1940 that I'd like to see"
switch somewhere in SQL that I need to flip?

TIA.


James R. Newman




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.