× 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 think I have found a bug in the SQL precompiler at V7R1. I have a DS defined that SQL fetches into, as well as the "SDS" data structure immediately follows it, followed by a line with a "D" in column six and nothing else (see below).

dcl-ds dsfetch qualified;
message like(zzqrymsg);
run_time like(zzruntim);
flag like(zzflag);
type like(zztyp);
recid like(zzid);
level like(zzlevel);
qrynum like(zznum);
qrymsg like(zzmsg);
qrycom like(zzcom);
end-ds;

D SDS
D Program 1 10
D User 254 263
D

I noticed that the fields in the SDS data structure were not used, so I commented out those 3 lines. Then, when I recompiled, I got the SQL0312 error. Turns out that the DS was fine. What I found was that the one "D" line with nothing else in it was causing the error. As soon as I placed an asterisk in column 6 of that line, the compile was fine (see below).

D****** SDS
D****** Program 1 10
D****** User 254 263
D******

So, the precompiler does not like D specs without any specs, when it follows the fetched DS definition. However, if you put an asterisk in column 6 it is fine, and if I had left the SDS DS intact, it is also fine.

Hope this helps someone who is stuck with this error.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.