To use interactively, enter the string to be searched and the file to be searched. If a library search is desired, leave the FILE field blank; to select files within this library, change the SELECT field to YES. If you wish to ignore case, set the SEARCH field to YES. Finally, choose the output form (DISPLAY, PRINT, or BOTH).
When the search is complete, the EOJ screen will display the number of occurrences found. Press PF(16) to exit here or PF(01) to return to select a new search string or library. (Note: exiting from the EOJ screen will set the return code from FINDTEXT to the number of occurrences found. This may confuse some menu programs that expect a zero return code.)
The PRINT option produces a report with the file name, location, type, and up to 78 characters surrounding the search item. If the file is a source file, the entire line is displayed.
If you are using the PRINT option and expect a large listing, you may wish to increase the allocated size of the print file. To to do, use a procedure to control the output GETPARM for the file (PRNAME = PRINT). The default record count is 1000.
Files searched by FINDTEXT are opened in INPUT mode, and must not be in use (or opened INPUT by other users). Note that the correction GETPARM for such conflicts will sometimes abort a background job, so it is best to have exclusive access to the libraries to be searched before running the search. Naturally, the user (or FINDTEXT itself) must have access privileges for the files to be examined.
The return code from FINDTEXT (if the program exits from the EOJ screen) is set to the number of occurrences found. This information can be trapped by the calling program and used as a count.
INPUT Press (RETURN) to continue, PF(13) for documentation, or PF(16) to exit program.TEXT (blank) The character string to be searched for. Can be up to 66 characters in length; quotes are optional.
FILE (blank) The file or library to be searched. LIBRARY [inlib] Leave FILE blank to search an entire VOLUME [invol] library.
SELECT NO Set to YES to select files from a library (interactive use only).
SEARCH NO Set to YES to ignore character case (e.g. upper or lower case); note that this slows the search process.
MODE DISPLAY Set to PRINT to produce a report with no screen display or BOTH for both options.
EOJ Press PF(01) to restart or PF(16) to exit program.