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



Okay. The scoop now is, different.

When I compile the SQLRPGLE, whether it's in RDi or from the 5250, I'm getting this:

SQL0511. "Host structure not defined or not usable. Reason: *The datetime format of a member of the host structure array does not match the SQL datetime format.*"

Okay, that was the only compile error remaining.

So I went to QSQLSRC and compiled the precompiler output source for the program and it compiled! Hunh?

My plan is this (unless I hear some alternative here):

Test it, run it through a few lines to make sure the fetch is getting data into the data structure array. I might have to use it this way, but I don't like it, it's inelegant, uncouth. If it compiles the precompiler output source, then why not straight from the SQLRPGLE?

--aec



On 6/9/2021 11:18 AM, Alan Cassidy wrote:
Spoke too soon. That was a different source that compiled, a previous version of the same program.

so back again to :

SQL0511.
"Host structure not defined or not usable. Reason: *The datetime format of a member of the host structure array does not match the SQL datetime format.*"

I have put DATFMT(*ISO) into the CTL-OPT parameters  in RPG, and added _EXEC SQL SET OPTION DATFRM(*ISO)_ to the SQL options.

How about it?

--Alan


On 6/9/2021 9:16 AM, Alan Cassidy wrote:
I finally thought about putting DATFMT(*ISO) into the CTL-OPT parameters and using EXEC SQL SET OPTION DATFRM(*ISO).

Okay, now it compiled.

The proof of the pudding will be in testing the program.

Thanks to everybody!!

Alan Cassidy


On 6/9/2021 8:40 AM, Alan Cassidy wrote:
I noted that this issue was resolved before,  and the way it got resolved was I compiled the QSQLSRC output of the program and saw what was wrong.

I inadvertently overlaid that code from the previous version of it (from Production) and now I'm getting a different error message Reason with SQL5011.:

"Host structure not defined or not usable. Reason: *The datetime format of a member of the host structure array does not match the SQL datetime format.*"

Is there an SQL option or an RPG pre-compiler value that can help for this one. I compiled the SQLRPGLE with RPGPPOPT(*LVL2) and then compiled the QSQLSRC-RPG output but that didn't help either, it

Is there a solution to handling the "datetime /*format*/ matching" issue here? It's happening at the cursor open statement, not the fetch.

I /think/ it had been working but I'm not sure now... Compiling the QSQLSRC output, searching IBM's web pages about it, searching midrange list archives, isn't helping.... :(

--Alan (aec)




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.