× 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 sometimes have issues with SQL precompile, but RDi Verify normally finds
the problem. In this case, the Verify only flags %passed() BIF (which RDi
doesn't support yet).


For ref, here's one of the errors.

Dcl-s TypeSQL varChar(7) ;

EXEC SQL DECLARE TypeDescCsr CURSOR FOR
select TYPE, DESC
from TYPEDESC
where TYPE like :TypeSQL
for read only;

SQL0312 30 8958 Position 29 Variable TYPESQL not defined or not usable
for reason code 1.


date: Fri, 22 Sep 2023 06:30:45 +0200
from: Daniel Gross <daniel@xxxxxxxx>
subject: Re: SQL Precompiler & **free

Hi Justin,

I'm not aware of size limits of the SQL-PC - but maybe there are some
chars before definitions in columns 1-5 or from column 81-100 that are
ignored in "non-**free" mode, and throw the error in "**free".

The problem is, that you don't see RPG compiler errors until the SQL-PC is
pre-compiling fine.

I had once a similar problem - so I changed the member type to RPGLE to
cut out the precompiler - and boom, I had a bunch of errors. Of course all
the EXEC SQL statements - but ignored those an found many errors in
definitions and code.

After fixing I changed the member back to SQLRPGLE and it compiled fine.

At first I often think, the SQL-PC must be wrong - but in 99.999% of all
cases, it's me, who is wrong.

HTH
Daniel



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.