MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

RE: Search OS/400 Physical Files



fixed

Glenn

That is basically what the WDSC RSE iSeries search seems to be doing - in its early versions it actually left the spooled files out there - yikes what a mess to clean up.

Vern

-------------- Original message --------------
From: "Glenn Gundermann" <ggundermann@xxxxxx>

This isn't elegant but all I knew how to do quickly when I needed to:

I wrote an rpg program FNDSTRPF that builds a list of files in a user
space and then for each entry with an extended attribute of PF, executes
the FNDSTRPDM command.

This produces a spooled file for each file.

I then had to write another program FNDSTRSPLF that builds the list of
spooled files to a user space, opens each spooled file, performs %SCAN,
and deletes the spooled file that matches a string (e.g. "(No members
match the find string)").

I am then left with a spooled file for each file that contains the string
I was searching for.

I am willing to share this code if anyone is interested.

Yours truly,

Glenn Gundermann
ggundermann@xxxxxx
Cell: 416-317-3144


How about FNDSTRPDM?

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Pat Barber
Sent: Thursday, July 10, 2008 10:11 AM
To: Midrange Systems Technical Discussion
Subject: Re: Search OS/400 Physical Files

I'll have to go back and find the clp examples of how to use QCLSCAN. I
recall writing clp code years ago to search through file(s) with no
problem at all.

After all, it would not be much of an API if you couldn't point to a file.

dsppfm and F16 certainly will find a string in a file but is limited to a
single file. The qclscan and clp could easily handle many files.

I would think sql is a better/quicker choice for what he wants.

The need to scan "many" files is a little unique and I would think rarely
used. Scans are mostly debugging tools for the most part.


vhamberg@xxxxxxxxxxx wrote:

Pat

You can't give this API a file name that I know of - Dave is looking for
something to search physical files from a list like one of the PDM things
or form WRKF - which has none of this, either.

QCLSCAN is, however, wonderful for searching in variables - and could be
used to write a search app for files, it seems.

Regards
Vern

-------------- Original message --------------
From: Pat Barber



From a programming standpoint, here is another way, which has been
around since the beginning.

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=
/apis/qcls
can.htm

CRPence wrote:



Shannon ODonnell wrote:




Does anyone know of a utility that will allow you to do a generic
search of OS/400 one or more physical files (singly or all at once)
for records containing a particular character string?

I'm thinking of something like the Windows Search function which
allows you to search for files containing a string within them.

I wonder if one of the unix-type commands I could run in Qshell
would have something that would work.








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


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.4.7/1544 - Release Date: 7/10/2008
7:37 AM
--
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.





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact