× 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 asked because I did copy/paste to try the compile :-) and I wanted to be sure I was not missing something. I had figured the reference was to both the DS field and the DB field, but I was not sure. For some reason my brain was stuck on the word /variable/ for the DS field. For a column it is moot, as SQL DDL always creates the date column with *ISO attribute. However there was no indication that I could see, why the RPG field in the DS would have been defined as *ISO; understand, I am only somewhat literate in RPG. I ignored the SET OPTION because I was thinking that was /just the SQL/; I see the implication now... The expectation that the pre-compiler would force the *ISO definition in the DS [or whatever it needs to do to function without error], given the SET OPTION was coded as the first SQL statement.

So with my less experienced perspective, for lack of seeing the Date Format coming from an External definition, I inferred the internal definition must be defaulting to *JOB. Thus I changed the source to add the DatFmt(*ISO) on the DS field and *it compiled*! But apparently it compiled only because I have additionally specified the DATFMT(*ISO) on the compile. That is...

The slightly modified source shown below actually does compile fine for me on v5r3 when specifying DATFMT(*ISO) on the compile [which is my default]. I also experienced that the unchanged source _does not_ compile with the default DATFMT(*JOB); neither does the modified source The changed source per CMPPFM:

I - D MyDate d DatFmt(*ISO)
D - D MyDate d

Sometimes it pays to be somewhat confused or even clueless, to circumvent a problem. ;-) At least I hope my unwitting changes prove functional [for compile; not tested functionally for run-time] for you also.

Regards, Chuck

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.