|
> I'm trying to write a front end for RUNQRY, but have not been able to > get the number, and type, of the parameters correct. I wrote a command a while ago called RQ, and use it a lot. You could write RQ to view a file, RQS to run a query with record selection to the screen, and RQP to view record selection, and continue with printing. I wrote a CL/RPG called PRQ (prompt run query) that obtains the library and file definition statements from the query, and continue to the RUNQRY prompt. You then change the runqry defaults and run the query. i.e. Change library names when running the query, for multi-data base systems. The following you could use to view a file without WRKQRY. RQ file(library/file) member(member) dcl &lib *char 10 dcl &file *char 10 dcl &mbr *char 10 chkobj qsys/&l *lib monmsg cpf.... library does not exist chkobj &lib/&file *file monmsg cpf... file does not exist rtvmbrd &lib/&file mbr(&mbr) monmsg cpf... member does not exist, file has no members, etc. /*all ok*/ runqry *n file(&lib/&file) mbr(&mbr) rcdslt(*yes) monsmg cpf0000 Execute: rq mylib/file member, and press enter. You can futher enhance the CL by usign the first member name if the member is not specified. Also, I send a status message indicating the library name, if *libl was used, the member name, no of current records and number of deleted records. There you are. Prompt for the runqry command, when entering via seu, and fill in the variable names, for library, file and member. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. 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.