|
Thanks Mark! It looks like that would do the job. I thought that I had done it with OS/400 commands but maybe not. I mostly didn't want to reinvent the wheel if it had already been done. Thanks again! Dave Parnin Nishikawa Standard Company Topeka, IN 46571 daparnin@xxxxxxxxxxxxxxxxxx MWalter@hanoverwire. com To: Midrange Systems Technical Discussion Sent by: <midrange-l@xxxxxxxxxxxx>@SMTP@CTB midrange-l-bounces@m cc: (bcc: David A Parnin/Topeka/NISCO/SPCO) idrange.com Subject: Re: Query scavenger hunt 11/15/2004 04:50 PM Please respond to Midrange Systems Technical Discussion <midrange-l@midrange .com> Here's a program that I wrote that does that. /****************************************************************** pgm parm(&lib) dclf file(qgpl/qryfilewk) dcl var(&lib) type(*char) len(10) dcl var(&mbr) type(*Char) len(10) /* put all query definitions into a temporary work file in QGPL */ /* This file has to be there for the program to compile */ dspobjd obj(&lib/*all) objtype(*qrydfn) output(*outfile) + outfile(qgpl/qryfilewk) outmbr(*first *replace) /* does the source physical file exist? */ /* if it doesn't, create it. */ chkobj obj(&lib/qrysource) objtype(*file) monmsg msgid(cpf9801) exec(crtsrcpf file(&lib/qrysource)) /* if it does exist, remove all of the members */ rmvm file(&lib/qrysource) mbr(*all) monmsg msgid(cpf7301) /* file read loop */ read: rcvf rcdfmt(qlidobjd) monmsg msgid(cpf0864) exec(goto cmdlbl(eof)) /* add the member to the source file and retrive the query */ /* definition into the member you just added. */ addpfm file(&lib/qrysource) mbr(&odobnm) rtvqmqry qmqry(&lib/&odobnm) srcfile(&lib/qrysource) + srcmbr(&odobnm) alwqrydfn(*yes) goto cmdlbl(read) eof: endpgm Then I use PDM Find (option25) on the members to scan for files. It's ugly but it works and it was free! ! ! Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com |---------+-------------------------------> | | daparnin@cooperstand| | | ard.com | | | Sent by: | | | midrange-l-bounces@m| | | idrange.com | | | | | | | | | 11/15/2004 04:40 PM | | | Please respond to | | | Midrange Systems | | | Technical Discussion| |---------+-------------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: midrange-l@xxxxxxxxxxxx | | cc: | | Subject: Query scavenger hunt | >------------------------------------------------------------------------------------------------------------------------------| Greetings, I believe that I've done this before but for the life of me I can't remember how. I want to find what user queries use a given file. I thought that I somehow used RTVQMQRY and then scanned the retrieved source for the file name. Unfortunately, that only does one query at a time. I might have written a program to do it for all queries in a given library but I was thinking that there was a way to do a bulk retrieval with just system commands. Any ideas would be appreciated. Thanks. Dave Parnin Nishikawa Standard Company Topeka, IN 46571 daparnin@xxxxxxxxxxxxxxxxxx -- 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. -- 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 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.