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



Thanks for the suggestion Charles but I still ran into the SQLPKG
requirement

I created a dynamic statement as suggested. In debug the last three
statements in the joblog were



Database connection started over TCP/IP.

CONNECT to relational database remoteSystem completed.

SQLSTATE = '51002'



Help text for 51002 is



*Message Text:*

SQL package &1 in &2 not found at DRDA Server.

*Cause Text:*

A remote request was attempted to &4 for SQL package &1 in &2. The SQL
package was not found. If you are using Interactive SQL or Query Manager,
an attempt to create a package on the remote system failed and the package
requested does not exist.

*Recovery Text:*

The most common cause of this problem in an Interactive SQL session to a
server that is not DB2 for IBM i is that the connection is not updateable.
In that case the package cannot be automatically created. To ensure the
connection is updateable, do a RELEASE ALL command followed by a COMMIT
before connecting to the relational database.

In other cases, the SQL package can be created by using the CRTSQLPKG
command. Also, precompiling an SQL program with the RDB parameter specified
will create an SQL package on the system. Create or restore the SQL
package. Run the application again.





So I think I still need an SQLPKG on the remote which I’m trying to avoid.



Thanks,



Rob

On Tue, Nov 8, 2022 at 10:46 AM Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

My guess would be static vs dynamic statements....

Try running the statement dynamically from the RPG program.

Charles

On Tue, Nov 8, 2022 at 8:05 AM Robert Rogerson <rogersonra@xxxxxxxxx>
wrote:

Hi all,
In ACS Run Sql Scripts I can do

INSERT INTO local.library.table
SELECT *
FROM remote.library.table;

But when I attempt this from an SQLRPGLE program I need an SQLPKG on the
remote system.

Due to SOX creating objects on the remote system (which in our case is
the
production machine) is frowned upon.

So my question is, why do I not have to create an SQLPKG to run the
query
in ACS?
Is there a way to run the query without creating an SQLPKG in an SQLRPGLE
program?

Thanks in advance,

Rob
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.