Created
August 15, 2022 07:06
-
-
Save BirgittaHauser/2ac5b56cd7d763027ddb26ad6c687de9 to your computer and use it in GitHub Desktop.
Scan though streamfiles
This file contains 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
Excelent