Forked from BirgittaHauser/Search_through_IFS_files.sql
Created
August 18, 2022 05:08
-
-
Save dancarlosgabriel/b100e372bf6fcf37396a62655be1ae95 to your computer and use it in GitHub Desktop.
Scan though streamfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Search thourhg IFS files that include a specific text (sequence of characters) | |
-- In the following example the '/home/Hauser' directory is searched for streamfiles with the extender .json | |
-- All these streamfiles are searched for 'FirstName'. | |
-- All streamfiles including 'FirstName' are returned. | |
-- Attention: Get_CLOB_From_File must run under commitment control! | |
Select Path_Name, Get_Clob_From_File(Path_Name) "IFS File Content" | |
From Table (Qsys2.Ifs_Object_Statistics(Start_Path_Name => '/home/Hauser', | |
Subtree_Directories => 'YES', | |
Object_Type_List => '*ALLSTMF')) x | |
Where Right(Trim(Path_Name), 5) = '.json' | |
and Get_Clob_From_File(Path_Name) like '%FirstName%' | |
Order By Path_Name | |
With cs; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment