Created
June 30, 2023 15:46
-
-
Save bdietz400/6d6354ca81bb495755c55a0773f53912 to your computer and use it in GitHub Desktop.
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
-- description: find in IFS files | |
-- using ACS 1.1.9.2 this will prompt you for starting path and search term | |
-- forced uppercase, if you know the case remove the "upper()", it may run faster | |
with ifsobjs (path, type) as ( | |
select path_name, object_type | |
from table(qsys2.IFS_OBJECT_STATISTICS( | |
start_path_name => ?, -- use /path/to/start/in | |
subtree_directories => 'YES')) a | |
where path_name like ? -- use %ifs file name% | |
) | |
select path, line, line_number, type | |
from ifsobjs i, lateral ( | |
select * from table ( | |
qsys2.ifs_read( | |
path_name => path, | |
end_of_line => 'ANY', | |
maximum_line_length => default, | |
ignore_errors => 'NO') | |
) ) r | |
where upper(line) like ? -- use %UPPERCASE TERM% | |
order by path ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment