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



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 05/07/2019
06:57:37 PM:
I have a SQLRPGLE program with SQL in both the mainline and an internal
(not exported) procedure. When I check SQLSTATE in the mainline, the
value
reflects the result of the last SQL operation. In the procedure, it is
not
being updated. None of the SQLCA elements are updated for SQL in the
procedure.

Is there a hidden trick to make the SQLCA elements work in a procedure?

No special requirements of which I am aware -- except that the
table data structure on which the SQL is based should be defined in main
global storage. We have many, many SQL programs that perform SQL
statements in subprocedures and check SQL STATE with no problems. We even
have some that open a cursor in one subprocedure, fetch from that same
cursor in another subprocedure, and close that same cursor from yet
another subprocedure. All can check SQLSTATE with no problems.

Sincerely,

Dave Clark

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.