Skip to content

Instantly share code, notes, and snippets.

@bdietz400
Created June 30, 2023 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdietz400/6d6354ca81bb495755c55a0773f53912 to your computer and use it in GitHub Desktop.
Save bdietz400/6d6354ca81bb495755c55a0773f53912 to your computer and use it in GitHub Desktop.
-- 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