Will the new IBM RUNSQL command offer any improvements into building the SQL command string? Ie stringing CL variables together with SQL statements?

Or will it still require stuff like:

CHGVAR &SQLCMD ('INSERT INTO LGFILE +
(LG_CLIENT, LG_SEQ, LG_DATE, LG_TIME, LG_DIR, LG_ID, +
LG_MODE, LG_NRECS, +
LG_ERRCDE, LG_TYPE, LG_FORMAT, LG_SOURCE, LG_TARGET, +
LG_JOBID +
) VALUES (' *tcat +
&QT *cat &P_CLIENT *cat &QT_C *cat +
&QT *cat &P_SEQ *cat &QT_C *cat +
&QT *cat &CUR_YYYYMD *cat &QT_C *cat +
&QT *cat &CUR_HHMMSS *cat &QT_C *cat +
&QT *cat &P_DIR *cat &QT_C *cat +
&QT *cat &P_ID *cat &QT_C *cat +
&QT *cat &MODE *cat &QT_C *cat +

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jack Callahan
Sent: Saturday, May 12, 2012 12:23 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: easier SQL statements in CL

But what the OP is really complaining about is the relative inelegance of
creating a string in CL that contains variables and single quotes- and the
SQL statement he needs to build requires vairables and single quotes.

I suggested solution to create the string using RTVMSGD several weeks ago,
although I admit it's not directly obvious what the created string will
look like when examining the CL.

Perhaps he should consider embedding the SQL in his RPG/COBOL program,
rather than using it as an OPNQRYF replacement.

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-2019 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].