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



You can setup a CLP with a corresponding command.
Adjust the parameters of FNDSTRPDM to suit your needs. In this example I am sending the member list of matches to the spool file and avoiding prompts.

Option(*NONE) PrtMbrList(*YES)


The CL program GS (source, in QCLSRC):

---------------------------->8

Pgm (&f &s)

Dcl &f *Char 10
Dcl &s *Char 48
DclF XYZ

Again:
RcvF
MonMsg CPF0864 Exec(Return) /* End of file */

/* avoid system files */
If (%Sst(&ODOBNM 1 1) *ne 'Q') Do
FndStrPDM &s File(&ODOBNM/&f) Mbr(*ALL) PrtMbrList(*YES) Option(*NONE
MonMsg PDM0055 /* file not found in library, ignore */
EndDo

Goto Again

EndPgm

---------------------------->8

The Command GS (source, in QCMDSRC):

---------------------------->8

Cmd Prompt('Global Search')

Parm FILE Type(*Char) Len(10) Min(1) Prompt('File Name')
Parm STRING Type(*Char) Len(48) Prompt('Find ''string''')

---------------------------->8

Compile them:

CrtCLPgm GS
CrtCmd GS GS


You can run it by typing the command name:

GS [enter]

The prompt looks like this:

Global Search (GS)

Type choices, press Enter.

File Name . . . . . . . . . . . QTXTSRC Character value
Find 'string' . . . . . . . . . 'This is a test'














Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys



El Fri, 4 Mar 2016 10:05:28 -0500
Hoteltravelfundotcom <hoteltravelfun-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> escribió:
HI I am looking for a tool or code. I have to lookup often
where a file is in use in a program. I run Find string using option 25 on
say
QRPGLESRC and it prints a list.

I would like to have a program that will take a parameter of a file
name,read all the libraries in our system, do this '25' on them. Do I read
a file in QSYS to get this?

then I would need the command to do the option 25.

Thanks this would save me alot of time.




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.