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



Look in the FAQ for RUNSQLSTM and you'll find an old but useful utility
that lets you run any SQL statement from a CL command line.
http://faq.midrange.com

I realize this is stretching way back, since it appears you were limited to
old RPG, but do you remember if there was a reason why you (or the original
author, in case you didn't touch that part of it) did not use the maximum
number of values on STRQMQRY's SETVAR parameter?  SETVAR allows up to 50
variables, and each variable can hold 55 characters.

I honestly don't recall. It could be something as goofy as a limitation of V2 CL :-)

Unless you have a better understanding of this than I do, I will attempt an
"enhancement" in my next free block of time.

Go for it!

Tis interesting how IBM set the limits on this command.  I understand this
utility uses STRQMQRY in a way IBM never intended.  Why didn't IBM add
another parameter to RUNSQLSTM for a direct statement, as an option to
providing a source member to find the statement(s) in?

Hard to say what IBM's intentions are for QMQRY. It seems to me that a query consisting entirely of replacement variables is legitimate :-) As for why IBM didn't add that extra parameter, I like to think it was so someone could make a few bucks enhancing OS400 functionality.

BTW, I renamed the utility to EXCSQLSTM -- retro S/38 conventions!

Flashback time! I stubbornly kept the name even after IBM came out with their own. I simply qualify it when I run it. I can't think of the last time I used STRSQL... If you combine use of a command-line SQL processor with a utility to capture all the commands out of the job log, you can pretty readily create everything needed to populate a test environment. Just capture the various commands (cpyf, CREATE TABLE, INSERT INTO, etc. in a CL source member and compile it for future use.
  --buck

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.