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



Hi Shane

I see Jon gave you good advice about testing with Run Sql Statements in ACS. As for SEQUEL, we use that, and I wonder if you have the right server specified. If server is *SEQUEL, there are many things in regular SQL that are not supported, the *SEQUEL syntax is somewhat like Query for i, plus some nice bits. But it goes back to the 90s, I believe.

You want to use IBM i syntax, and for that you must specify either *LOCAL or *LOCALSYS for the server, IIRC. Even those might not always work, but be sure to check what "server" you are using.

Cheers
Vern

On 8/19/2024 4:46 PM, Shane Reeves wrote:
Hello,

I have a somewhat complex SQL statement (for me) that I was looking to run in a program. Normally we use SEQUEL by Fortra but from what I've found so far it doesn't support the statement I'm attempting (I've contacted their support to find out for sure). So, I started looking at RUNSQL to see what I could use it for, as we've not used it very often.

Starting with a simple insert statement to test it out it came back with 'RUNSQLSTM or RUNSQL command failed'. After many different small tests that was all that I could get for RUNSQL to return (when running from the command line). So, I tried putting the same statement in a CLLE program using RUNSQL, and it worked fine. Why would the same statement work in the CLLE program, but not from the command line? It makes testing statements so much more difficult.

Shane Reeves

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.