|
Hi, Ken, thanks for your answer. If anyone else can add something to this subject from what I write below, I would appreciate any help. Maybe I misunderstood the purpose of QQQQRY, but the reason I thought it could do what I need comes from the following statement: ( concentrate in " ... or get information from the QDT ...") "You can use this API to run a query, create an access plan, or get information from the QDT. .../... Cheking the QDT allows you to validate the values in this QDT" which can be found in OS/400 File APIs V3R2 Doc.Number: SC41-3857-00, section 1.8 QQQQRY API BTW, I was surprised to find this reference directly searching in Altavista with QQQQRY as search string... Well, if things cannot be done in a clean way... It's surprising that certain functions can only be carried out from a display, in a manual way: Printing the Query definition using option 6 in the Work with Queries display gives you all the required info to spool, which I can process afterwards, but the point is - you have to key "6" manually in each Query - and it will only allow for (I believe) 32 (don't quite remember the exact number) of them to printed at once. If you happen to have many (hundreds of) Queries, it is burdensome... But the main point is, we want to provedi some kind of documentation of what files is each query using, for the purpose of predicting which queries need to be recreated/changed when we alter the design of a given file... So we need to gather all queries use of input/output files, and be able to update this data, say at night, in an automatic and easy way... and I thought the API could do it. Some of these days I happenned to see someone else's question about how one could provide automatic output from NETSTAT *CNN to a file, which can be done interactively from the display, but cannot either be automated... It's quite frustrating that things that can be so easily done interactively, cannot be done even with API's! Thanks and best regards, Antonio ================================================================= "Sims, Ken" escribió: > Hi Antonio - > > >I have been digging for some time looking for automating retreiving info > >on queries built with Query/400, i.e. those based on specifications of > >type *QRYDEF. > >I found everything about API QQQQRY, and it seems reading thru the > >queries template would do the work I need... Everything seems hendy... > >except for the main question: > > You are misunderstanding the function of QQQQRY. It has nothing to do with > retrieving information about existing queries, whether Query/400 or QMQRY. > It is an interface to the query engine. That is, you build your own query > definition template and pass it to QQQQRY and you will get back the result > set that meets the specifications of your query template. > > >How can I retreive the QDT (Query Definition Template) of any given > >Query???? (one that already exists). > > You can't do it with QQQQRY. If you want just a limited subset of > information you can use RTVQMQRY with ALWQRYDFN(*ONLY). If you want to know > everything about a query, you will probably have to retrieve the query > object through MI or through DMPOBJ and copying the spooled file to a data > base file, then write your own program to parse the data into something > meaningful. > > Ken > Southern Wine and Spirits of Nevada, Inc. > Opinions expressed are my own and do not necessarily represent the views of > my employer or anyone in their right mind. > > +--- > | This is the Midrange System Mailing List! > | To submit a new message, send your mail to MIDRANGE-L@midrange.com. > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. > | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- -- Antonio Fernandez-Vicenti aiv@ctv.es +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.