On 9/26/24 2:39 PM, Javier Sanchez wrote:
If that program is registered as a stored procedure, it may be called as
such from an ODBC/JDBC connection.

HMMMM....

I just conducted an experiment.

Based on something I'd just read at
https://www.ibm.com/docs/en/i/7.4?topic=csp-using-embedded-call-statement-where-no-procedure-definition-exists

I didn't bother registering a stored procedure. I simply created a completely headless program (a CL one-liner, consisting of a single SNDMSG), and called it from a STRSQL session, with "CALL TEST26SP2024. It worked.

Then I brought up Squirrel SQL on my desktop system, and tried calling it from there.

CALL MERCURY/TEST26SP2024 gave me an error message; it didn't like the qualified name.

CALL TEST26SP2024 didn't work either, because it looked for it in a nonexistent library named after my user profile.

But CALL MERCURY.TEST26SP2024 worked.

Yes sir, you have to redefine the stored procedure too, because the
original attributes of it will remain with the old program. In my
experience, if I don't do that, it will call the one that was put in the
QRPLOBJ library.

As soon as I saw this, I went and made a change to the message and recompiled my CL program, to see what would happen calling an unregistered program. Then I repeated the call in Squirrel.

I got the recompiled program. So it would seem I can avoid the pitfall simply by avoiding the registration.

--
JHHL

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.