There is a more advanced (and complex) method based on the command "RTVQMQRY ALWQRYDFN(*ONLY)". This utility does not use this method, but it's simple and it works.
Highligts
License
Unless otherwise specified you can
only use the FNDSTRSYSO if you have got it directly from me. You
can install and use it on one single iSeries 400 (AS/400) to scan *QRYDFN's
in any commercial or non-commercial project YOU are working on.
You can allow anyone else working on the same project on the same
iSeries 400 (AS/400) to use it. You can distribute this text only (the description
and my address) to anybody you want if it is not changed. Actually
you are invited to do so. No other distribution is allowed. You
must remove the utility from machines you will no longer have
access to. You are not allowed to sell (alone or as part of
a project) any output or services from this utility.
You are expected within a month after download to send a message with your opinion to the author.
Find String in System Object (FNDSTRSYSO) command for IBM iSeries 400 (AS/400)
All you have to do is to fill the form.
You will then receive the program in few days.