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



Tim

Short answer---Yes!

Long answer---I really like what someone else outlined briefly - use Query Management queries and forms. They are similar in concept to good old Query/400 queries - those put both the data retrieval (QM query) and presentation (QM form) into one object.

You can even import Query/400 query definitions into QM objects, which are compiled objects.

A QM query (*QMQRY object type) simply holds and SQL statement, SELECT for reports. It can have substitution variables, meaning you can call it from CL with input values.

A QM form (*QMFORM object type) holds the layout and is best created and maintained using STRQM - same for the *QMQRY.

Once you have the query and form worked out, all you need is a command with the parameters you want to use, a command-processing program that takes those parameters, and then that program uses the STRQMQRY command with the form specified and with SETVAR parameter set to the input values. Voila!!

There is a Query Manager - that is STRQM - and that has options for doing both queries and forms. It has an appearance similar to Query/400 if you want at first - then you can get an idea of how the SQL is going to look. And the forms part is very like Query/400 - with some nifty features, like 9-line column heading possible, wrapping text within columns, like that.

For ad hoc or quick reports I know nothing much better - very easy to do.

There is a Query Manager user guide that walks you through it nicely. It is at

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc415212.pdf

And there is a programmer's guide that has helpful stuff - especially about converting from QRYDFN to QMQRY - at

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc415703.pdf

HTH
Vern


-------------- Original message --------------
From: "Tim Gornall" <tgornall@xxxxxxxxxx>

There appears to be much SQL talent on this list, and I'm thinking I may be
way behind the times. So here's a "how are you guys doing it" question.
A typical example: A request comes in for a new report. It will require
the user to enter some selection data (let's say from and to dates), then
process a bunch of records within RPG. I'm still using open query files,
record select logic in RPG, etc. Are some of you using SQL to do this, is
it a better way, or just different? Would anyone like to share example code
of a clean lean application using SQL?

Thanks, Tim


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