× 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 have a SQLPRGLE program compiled to a target release of V5R4M0
that works correctly in V7R1M0, but throws a SQL exception when
processing the prepare statement. The purpose of the
code is to simply find the longest line in the file.

/ Eval cmdSQL = 'DROP ALIAS QTEMP/AA';
/ exec sql Execute Immediate :cmdSQL;
/
/ Eval cmdSQL = 'CREATE ALIAS QTEMP/AA FOR QTEMP/DISP(DISP)';
/ exec sql Execute Immediate :cmdSQL;
/
/ cmdSQL = 'SELECT MAX( LENGTH( TRIM(DISP) ) ) FROM QTEMP/AA';
/ exec sql prepare s1 from :cmdSQL;

SQL values after processing the prepare statement:

sqlcod = 204
sqlerm =
....5...10...15...20...25...30...35...40...45...50...55...60
' *ALL *N MEM '
' '

Does anyone know if there is an issue with the above code?

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.