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



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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.