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



This is something fairly crude written many years ago, but works - clp & command check your system value for library lists. Older systems had a limit on #libraries in lib list. This cmd & clp uses the Ibm command FNDSTRPDM to execute the search. You should
read the help text to understand it.
You could populate the &xlibl any way you want, but this command prompts users

                    Find String PDM in mult libs (ZFNDSTR)
Source File Name . . . . . . . .         ________        Name
Member Name, *generic*, *all . . ________         Name
What to find - in quotes . . . .        ___________________________
Option . . . . . . . . . . . . . ________ *DSP, *EDIT, *COPY, *PRT,
Print List . . . . . . . . . . .                ________       *Yes, *No
Library List . . . . . . . . . .              ________      *LIBL, *ALLUSR
*************** Beginning of data *************************************
            PGM        PARM(&SRCFIL &MBR &FIND &OPTION &PRINTL +
                         &LIBL) /* FNDSTRPDM production libs */
            DCL        VAR(&FIND) TYPE(*CHAR) LEN(30)
            DCL        VAR(&SRCFIL) TYPE(*CHAR) LEN(10)
            DCL        VAR(&MBR) TYPE(*CHAR) LEN(10)
            DCL        VAR(&OPTION) TYPE(*CHAR) LEN(10)
            DCL        VAR(&PRINTL) TYPE(*CHAR) LEN(4)
            DCL        VAR(&LIBL) TYPE(*CHAR) LEN(7)
            DCL        VAR(&XLIBL) TYPE(*CHAR) LEN(8000)
            DCL        VAR(&USRLIBL) TYPE(*CHAR) LEN(2750)
            DCL        VAR(&MSG) TYPE(*CHAR) LEN(70)
            DCL        VAR(&LIB) TYPE(*CHAR) LEN(10)
            DCL        VAR(&X) TYPE(*DEC) LEN(5 0) VALUE(1)
            DCL        VAR(&MC) TYPE(*CHAR) LEN(1)
            DCLF       FILE(QADSPOBJ)

/* GET USER LIB LIST FROM JOB ATTRIBUTES.                          */
/* THIS VARIABLE IS 275 BYTES LONG, CONTAINING UP TO 25 LIBRARIES  */
/* PROCESS THEM 1 AT A TIME                                        */
/* USER MAY CHOOSE *ALLUSR LIBS                                    */
           RTVJOBA    USRLIBL(&USRLIBL)
           CHGVAR     VAR(&XLIBL) VALUE(&USRLIBL)
           IF         COND(&LIBL *EQ '*ALLUSR') THEN(DO)
           CHGVAR     VAR(&XLIBL) VALUE(' ')
/* GET LIST OF LIBRARIES */
           DSPOBJD    OBJ(QSYS/*ALL) OBJTYPE(*LIB) +
                        OUTPUT(*OUTFILE) OUTFILE(QTEMP/ZDSPOBJD)
/* OVERRIDE TO FILE CONTAINING LIST OF LIBRARIES */
           OVRDBF     FILE(QADSPOBJ) TOFILE(QTEMP/ZDSPOBJD)
/* READ NEXT LIB IN THE LIST */
$READ:      RCVF
           MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL($NOREAD))
           CHGVAR     VAR(%SST(&XLIBL &X 10)) VALUE(&ODOBNM)
           CHGVAR     VAR(&X) VALUE(&X + 11)
           GOTO       CMDLBL($READ)
           ENDDO
$NOREAD:
           CHGVAR     VAR(&X) VALUE(1)
$AGAIN:

/* VERIFY SOURCE FILE EXISTS IN LIB - IF NOT THEN GET NEXT LIB*/
            CHKOBJ     OBJ(%SST(&XLIBL &X 10)/&SRCFIL) +
                         OBJTYPE(*FILE)
            MONMSG     MSGID(CPF9800) EXEC(GOTO CMDLBL($SKIP))

/* SEND STATUS MSG TO USER WHICH LIBRARY SEARCHING*/
            CHGVAR     VAR(&MSG) VALUE('Checking user library ' || +
                         (%SST(&XLIBL &X 10)))
            SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG) +
                         TOPGMQ(*EXT) MSGTYPE(*STATUS)
            DLYJOB     DLY(2) /* give user time to see lib name */

/* EXECUTE FNDSTRPDM FOR THIS LIB */
            FNDSTRPDM  STRING(&FIND) FILE(%SST(&XLIBL &X +
                         10)/&SRCFIL) MBR(&MBR) OPTION(&OPTION) +
                         PRTMBRLIST(&PRINTL)
            MONMSG     MSGID(CPF0000) /* source file not found, etc */

/* INCREMENT COUNTER TO GET NEXT LIB IN USER LIBL */
$SKIP:      CHGVAR     VAR(&X) VALUE(&X + 11)

           IF         COND((%SST(&XLIBL &X 10)) *NE ' ') +
                        THEN(GOTO CMDLBL($AGAIN))
$END:       ENDPGM

*************** Beginning of data ***********************************
            CMD        PROMPT('Find String PDM in mult libs')
            PARM       KWD(SRCFIL) TYPE(*CHAR) LEN(10) MIN(1) +
                         CHOICE('Name') PROMPT('Source +
                         File Name')
            PARM       KWD(MBR) TYPE(*CHAR) LEN(10) MIN(1) +
                         CHOICE('Name') PROMPT('Member +
                         Name, *generic*, *all')
            PARM       KWD(FIND) TYPE(*CHAR) LEN(30) MIN(1) +
                         CHOICE('Text') PROMPT('What to find - in +
                         quotes')
            PARM       KWD(OPTION) TYPE(*CHAR) LEN(10) MIN(1) +
                         CHOICE('*DSP, *EDIT, *COPY, *PRT, etc') +
                         PROMPT('Option')
            PARM       KWD(PRINTL) TYPE(*CHAR) LEN(4) MIN(1) +
                         CHOICE('*Yes, *No') PROMPT('Print List')
            PARM       KWD(LIBL) TYPE(*CHAR) LEN(7) MIN(1) +
                         CHOICE('*LIBL, *ALLUSR') PROMPT('Library +
                         List')


Jim Franz


----- Original Message ----- From: "Yivi" <nardus@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <MIDRANGE-L@xxxxxxxxxxxx>
Sent: Friday, January 13, 2006 2:52 AM
Subject: searching for members


Ok, newbie time.

It must be a terribly basic question, but can't seem to phrase the question
in a way that makes google give me the proper answer.

How do you get a list of all the members that contain a particular search
pattern, looking across different libraries and archives?

Thx for any help you can provide.

Regards,

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

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.