Try something like this:
Select Path_Name, Get_Clob_From_File(Path_Name) "IFS File Content"
From Table (Qsys2.Ifs_Object_Statistics(Start_Path_Name => '/YourFolder/Dir2/Dir3',
Subtree_Directories => 'YES',
Object_Type_List => '*ALLSTMF')) x
Where Right(Trim(Path_Name), 5) = '.xml'
and Get_Clob_From_File(Path_Name) like '%Whatever you are looking for%'
Order By Path_Name ;
Note: GET_CLOB_FROM_FILE has to be run under Commitment Control
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization – Education – Consulting on IBM i
"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them and keeping them!"
„Train people well enough so they can leave, treat them well enough so they don't want to.“ (Richard Branson)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Vern Hamberg via MIDRANGE-L
Sent: Samstag, 13. August 2022 00:55
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>
Subject: Re: Find string in multiple it's files using sql services
I know how to use grep and all, this is not another chapter in that unpublished rag, for my purposes an sql solution serves me more directly, I wanted to avoid a command line solution.
Cheers
Vern
-----Original Message-----
From: Jack <midrange-l@xxxxxxxxxxxxxxxxxx>
To: Midrange <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Jack <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Friday, 12 August 2022 4:10 PM CDT
Subject: Re: Find string in multiple it's files using sql services
On Fri, Aug 12, 2022 at 10:38 AM Roger Harman <roger.harman@xxxxxxxxxxx>
wrote:
As opposed to using "grep"?
The only sensible way to do it, and if you are on IBM i and not planning to
off-platform, it's half-past time to learn grep sed tr etc. and your basic
pipeline tools.
*Another chapter in the continuing saga of "Open Source Is Not An Option,
It's A Necessity".*
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Vern Hamberg via MIDRANGE-L
Sent: Friday, August 12, 2022 8:15 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>
Subject: Find string in multiple it's files using sql services
I have XML files in a folder, I want to see which ones have a certain
value in them, such as an account code. I tried ifs_object_statistics with
start_path_name ==> set, joined to ifs_read, the path_name from
ifs_object_statistics in path_name ==>.
As an Amazon Associate we earn from qualifying purchases.