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


  • Subject: Re: Checking lots of Queries for a field
  • From: "Peter Dow" <pcdow@xxxxxxxxx>
  • Date: Wed, 27 Oct 1999 12:01:05 -0700

Here's a start. It puts source for each query into a source file member,
after which you could use WRKMBRPDM option 25.

PGM
/***********************************************************************/
/* BUILD QUERY REFERENCES FILE                                         */
/*                                                                     */
/*  Submits itself to batch if interactive, then does DSPOBJD of all   */
/*  queries in *ALLUSR libraries to output file QRYREF in QGPL.        */
/*                                                                     */
/* REVISION HISTORY:                                                   */
/* 10/11/1999 pcd Program created.                                     */
/*                                                                     */
/***********************************************************************/
             DCLF       FILE(QADSPOBJ)

             DCL        VAR(&JOBTYPE) TYPE(*CHAR) LEN(1)

/* If interactive, submit to batch */
             RTVJOBA    TYPE(&JOBTYPE)
             IF         COND(&JOBTYPE *EQ '1') THEN(DO)
             SBMJOB     CMD(CALL PGM(QRYSRCBLDC)) JOB(QRYSRCBLD)
             RETURN
             ENDDO

/* Produce output file of all query definitions in all user libraries */
             DSPOBJD    OBJ(*ALLUSR/*ALL) OBJTYPE(*QRYDFN) +
                          OUTPUT(*OUTFILE) OUTFILE(MISTOOLS/QRYLIST)

/* For each query in list (outfile), retrieve definition as Query Mgmt query
source */
             OVRDBF     FILE(QADSPOBJ) TOFILE(MISTOOLS/QRYLIST)
Main10:
             RCVF
             MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(MAIN90)) /*eof*/

             RTVQMQRY   QMQRY(&ODLBNM/&ODOBNM) +
                          SRCFILE(MISTOOLS/QUERIES) ALWQRYDFN(*YES)
             GOTO       CMDLBL(MAIN10)

Main90:
             DLTOVR     FILE(*ALL)
ENDPGM


From: Allen, Stuart

> Does anyone have a routine that lets you scan a load of Query definitions
> for a particular field, a la option 25 in PDM?

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


__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

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

Replies:

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.