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



thanks vern. i was hoping to use qsh find but syntax is confusing and i’m
not sure if using it over qsys.lib will work.

On Wed, Feb 24, 2021 at 4:38 PM Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

hi Frank



Basically, no, you can't with SQL - not easily for what you want, I think.



Of the options I looked at and mentioned, I see only a program that gets

the list of all PFs - could be done with SQL service object_statistics

or something like that - the for each file you get, do something like this
-



FNDSTRPDM STRING('search-string')

FILE(LIBNAME/FILENAME)

MBR(*ALL)

OPTION(*NONE)

PRTRCDS(*ALL)



You'll get lots of SPLF - although you MIGHT be able to do an OVRDBF to

point whatever PRTF it puts out at some kind of PF, maybe one created

not from source. I don't remember if there's an *ADD option on the
override.



Then lots of lines NOT to look at, right?



I'm just taking an off-the-cuff shot at how to do all this - test,

verify, see what works, eh?



And I hope someone else has a better idea!



Regards

Vern



On 2/24/2021 3:21 PM, frank boke wrote:

yes i am looking to see what files contain a certain string...actually a

name...Is it possible to use SQL for that?



On Wed, Feb 24, 2021 at 10:15 AM John Yeung <gallium.arsenide@xxxxxxxxx>

wrote:



On Wed, Feb 24, 2021 at 8:30 AM Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>

wrote:



Although this is very useful, I think the original poster is looking
for

contents of the columns, not just column names.

Have I missed something?





Niels did say you could use regular expressions and SQL to search



*any* library/file/field (or schema/table/column). I think his example



was chosen to do double duty:







1. Shows how to use regular expression search *in general* (because



you could substitute any schema in place of QSYS2, any table in place



of SYSCOLUMNS, and any column in place of COLUMN_NAME).







2. Reminds us that we can get a lot of information from SYSCOLUMNS



(and the system catalog in general), which could help us if we are



trying to search for something and we either don't know the names of



the columns (or whatever) beforehand, or we have a lot to search (so



we can use the catalog info to help us build a script for the task).







John Y.



--



This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list



To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx



To subscribe, unsubscribe, or change list options,



visit: https://lists.midrange.com/mailman/listinfo/midrange-l



or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx



Before posting, please take a moment to review the archives



at https://archive.midrange.com/midrange-l.







Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related

questions.







Help support midrange.com by shopping at amazon.com with our affiliate

link: https://amazon.midrange.com







--

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list

To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx

To subscribe, unsubscribe, or change list options,

visit: https://lists.midrange.com/mailman/listinfo/midrange-l

or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx

Before posting, please take a moment to review the archives

at https://archive.midrange.com/midrange-l.



Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.