FIND is a TSO command that scans all members of a Partitioned Dataset for an argument string and reports the number of occurrences found.
I retrieved it from File #166 of the #341 version of the CBT tape and is part of a
collection submitted by Vinh Vu of Frito Lay.
The only changes I made in order to accomodate assembly under MVS 3.8j was to place the required macros inline before the source and to move a set of control block macros such that they preceeded subsequent reference to fields defined during their expansion. The jobstream provided here will install the command load module and also the HELP text accessible via the TSO help command. The single jobstream to assemble and link-edit the load module and install the help text - find$.jcl - is contained in the archive find.tgz [MD5: CAADC9007CD4ADA09FB3C3D4578BB971]. Download the archive and extract the jobstream (WinZip on Windows/?? or tar on Linux). Submit the jobstream to assemble and link the single load module for FIND into SYS2.CMDLIB and copy the help text into SYS2.HELP. If you don't have SYS2.CMDLIB defined, you will need to modify the jobstream to specify a different target load library. Also if you do not have SYS2.HELP defined, you may modify the jobstream to place the help information into SYS1.HELP.
From the help text:
FUNCTION - The FIND TSO Command searches for a character string in a PDS (Partitioned Data Set) and displays the number of occurrences found in each member. This command can be executed under native TSO mode or SPF/Option 6. The command will prompt for Data Set Name and search argument. The total for occurrences and members will also be displayed at the end of execution. SYNTAX - FIND 'DSNAME' S('CHARACTER STRING') GROUP(XX) LOWER QUICK REQUIRED - 'DSNAME' S('Character string') DEFAULTS - None OPERAND - 'DSNAME' - Name of the partitioned Data Set to be searched. Omit the single quotes and the first data set qualifier if it is your own data set. S('Character string') - The string of characters to be searched for. Could be a program name, data set name, or text data, etc.. GROUP(XX) - Optional Keyword. Used to limit the search on only members having name beginning with XX. E.g. FIND '$VNV.JCL.CNTL' S('PGM=IDCAMS') GROUP($) LOWER - Optional Keyword. Used to search for lowercase TEXT character string. If this keyword is not used, the character string will be converted into uppercase before the search is being performed. QUICK - Optional Keyword. Used to stop command from reading the entire member after the first occurrence found. Process continues to the next member.
I hope that you have found my instructions useful. If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:
Return to Site Home Page
This page was last updated on January 17, 2015 .