Assume the need is to find every line of module text with the character string "SUBSTR" in it.
If the
dictionary has an SQL schema defined for it (called APPLDICT in the example below), the following SQL can be used.
SET SESSION CURRENT SCHEMA APPLDICT;SELECT MOD_NAME_067, MOD_VER_067, IDD_SEQ_088, SOURCE_088FROM "MODULE-067" INNER JOIN "TEXT-088" ON "MODULE-TEXT" WHERE LOCATE('SUBSTR', SOURCE_088)>0;If no such SQL schema exists, this can also be achieved with OLQ style SQL in an
OLQBATCH job with the following syntax (the actual text line is not shown here due to OLQBATCH report line width limitations, but it identifies the module and line sequence number).
//SYSIPT DD * SET ACCESS OLQ SET DICTNAME SYSDIRL SET DBNAME APPLDICT SIGNON SS IDMSNWKA SCHEMA IDMSNTWK ( 1) SELECT MOD-NAME-067, MOD-VER-067, IDD-SEQ-088 -FROM MODULE-067, TEXT-088 -WHERE MODULE-TEXT AND INDEX(SOURCE-088, 'SUBSTR')>0 DISPLAY