|
On Tuesday 03 December 2002 8:20 pm, Vern Hamberg wrote: > Troy > > I don't mean to be too subversive, but you can have full SQL capability > with QM queries. There's a whole set of commands, CRTQMQRY, DLTQMQRY, > WRKQMQRY, STRQMQRY. You put an SQL statement into a source member (no > semi-colon after the statement), then execute the CRTQMQRY command over > that member. Then use STRQMQRY to run it. You can even put in > substitution variables. > > One QMQRY you could write would have all substitution variables, then > you put your statement into the SETVAR parameter of STRQMQRY (55 > characters each variable). > > Another handy one would have a statement like > > select * from &LIB/&FILE > > in a member called DSPANYFIL > > Then you'd run > > strqmqry somelib/dspanyfil setvar((lib 'yourlib') (file > 'yourfile')) > > This'd display the first member in a nice SQL layout, and would work on > logical files, too. > > There are caveats even with this simple example, but it's a start. > > This is a part of every 400 - part of the O/S, so you can't uninstall > it. > > :-) > > Vern Troy And if you want a head start, have a look at http://dbg400.net/excsql.html for a way to use QMQRYs to give you an ad-hoc SQL tool. I don't know if an open source app would be any better from your company's perspective, where they can at least see what goes on behind the scenes, but there's not much code in it, so implementing your own 'version' would be easy enough ;) Regards, Martin > At 02:44 PM 12/3/2002 -0500, you wrote: > >You know I was almost fired for putting that utility on our AS/400 and > > I think it is a very valuable tool. Don't you think this bites? I > > did have to finally take it off. We don't even have SQL on our AS/400 > > and this program gives you a certain amount of SQL functionality. > > > >Thanks > >Troy > ><sorry no company name suggested> > ><just remember the name> -- martin@dbg400.net (plain text emails only) http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X Debian GNU/Linux | ASCII Ribbon Campaign against HTML mail & news / \
As an Amazon Associate we earn from qualifying purchases.
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.