Build the SQL in an RPG and then call DOCSQL.

Make life easy :-)

Richard Schoen
RJS Software Systems Inc.
Where Information Meets Innovation
Document Management, Workflow, Report Delivery, Forms and Business Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site:
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT


message: 6
date: Fri, 30 Mar 2012 13:34:37 -0500
from: Vern Hamberg <vhamberg@xxxxxxxxxxx>
subject: Re: Is there a better way to run SQL in a CL pgm?


Joel, you may know that our DOCSQL utitlity, which you are using, does
use STRQMQRY - it is just so generic that you have to build up the whole

There are very nice ways to get quotes in the right places by using a
custom *QMQRY - it's pretty easy - and one of the tricks is to use a
substitution variable, similar to Michael's suggestion - but for a
single quote - then you use that variable &QT, say, everywhere and it
just gets handled. There have been other posts here about that - here's
where I learned that trick.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by 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.