× 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.



Jim, Did you look at earlier messages in the job log? They will often have the detail you want to know, and can point you to the error.

Be sure to look at 2nd-level text.

HTH
Vern

On 7/22/2014 1:34 PM, James Newman, CDP wrote:
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 ...

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.