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



You say that you are copy and pasting the statement, but the statement uses host variables. At the very least I would think that you are manually replacing those with the values you want to use. If you are doing that, then you are doing what you think the sql preprocessor and run time pieces are doing. Either, the preprocessor/runtime isn't doing what you think it is, you have some other small bug that you are overlooking in your code, or you have found a bug in the OS. If it is #1 or #2 then the information that people have been asking for would help eliminate those. If it is #3 then you need to open a support ticket with IBM. Since you seem to be unwilling to give anyone the information they are asking for, at this point it seems to me your only choice is going to be opening a support ticket with IBM. I would be interested in what they say. As I said before, I got so tired of fighting host variables, likes, and wildcards that if I have one I need today, I automatically just write it as a dynamic sql statement.


________________________________
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Marvin Radding <marvin.radding@xxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, December 11, 2019 3:49 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: A problem in embedded SQL

Booth,

As I have repeatedly said, I am doing a copy/paste to use the sql statement in STRSQL. It fails in RPGLE but is successful in STRSQL.

Thanks,

Marvin
No trees were killed in the sending of this message, but a large number of electrons were terribly inconvenienced, traumatized, triggered, and crying for their safe spaces.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Booth Martin
Sent: Wednesday, December 11, 2019 1:33 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: A problem in embedded SQL

Have you run the program in debug and looked at the prepared statement?

Sometimes there will be a missing space character so that the statement will run, but not correctly.

(There is no need to ask me how come I happen to know that.)

On 12/11/2019 9:25 AM, Marvin Radding wrote:
Alan,

I construct the sql statement, perform a prepare, and then open the cursor. When I do the fetch it fails to find the record. I copy the sql statement from the RPGLE program and paste it into STRSQL and it finds the record. I don't understand why there is a difference between the two.





[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com



CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

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.