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



Mine is safe heh, heh! We called it EXECSQL as we were used to this in our
RPG's. No chance of that resembling a cl command.

2012/5/15 Gad Miron <gadmiron@xxxxxxxxx>

Oops, there goes my privet RUNSQL CMD

Some years ago I created a *simple* RUNSQL CMD that receives a (SQL
statement) string,
saves it in a temp MBR in a temp file in QTEMP, runs it using RUNSQLSTM and
then clears all .
Example:
RUNSQL SQLSTMT('delete from vrsezkf a where not +
exists (select 1 from WKEVRSF b where +
b.WKENBR = a.WKENBR and b.VRSION = +
a.VRSION)')
Or
CHGVAR VAR(&SQL) VALUE('update QTEMP/HDRS4CSV +
set ' *CAT &HEADER *CAT ' = (select +
WHCHD1 from QTEMP/DSPFFD a where rrn(a+
) = ' *CAT &FLDNBRA *CAT ')')
RUNSQL SQLSTMT(&SQL)

Couldn't IBM ask around before appropriating the name RUNSQL ?

Gad



date: Fri, 11 May 2012 16:34:17 -0500
from: Jim Oberholtzer <midrangel@xxxxxxxxxxxxxxxxx>
subject: Re: easier SQL statements in CL

Last week at COMMON's Annual Meeting Kent Milligan said IBM was getting
ready to (or maybe already has) release a RUNSQL command. It will be
available via PTF for V7 and V6. I don't have many details beyond, it
will not be able to bring back a result set directly. You'll have to
populate a temp file and process from there.

Jim Oberholtzer
Chief Technical Architect
Agile Technology Architects
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




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.