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).
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.
This mailing list archive is Copyright 1997-2026 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.