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



Yeah, that's cool - I've used the Set variable statement to do this, as I recall - use a host variable as in set :variable = [some SQL that returns a single value] - and I think I did an execute immediate. But it's been awhile, so be sure to verify it for yourself if you want.

Vern

On 9/17/2014 10:10 AM, kevin wrote:
Hi Bill,

I've recently (last week) built this into an RPG Free program that checks for a record in a file.

String = 'values( select count(*) from ' + %Trim(SchemaFile) +
' where ' + %Trim(FieldName) + ' = ' +
Quote + %Trim(AppDefName) + Quote + ') into ?';

Exec SQL prepare S1 from :String;
Exec SQL execute S1 using :Count;

Count gets set to 1..assuming the record exists..

Regards

Kevin




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.