The Include keyword is commonly used in a lot of programming languages. It is usually prefixed by a special character. Qedit currently recognizes the following prefixes: dollar sign ($), pound sign (#), dot (.) or exclamation point (!).
The Use keyword is used in Qedit or Suprtool Use files and in Cognos Powerhouse e.g. Quiz, Quick. It does not have any prefix and is recognized as long as it is the first word on a line.
Copy statements are recognized in Cobol source files. This is part of the Cobol standards.
To search for one of these keywords, you enter the corresponding option on the List command: $include, $use and $copy. For example:
/open rep23.src /list $include "abort(914)"
This works well if the files you are working with already contain one of these keywords. It does not work so well if the files you want to list are of mixed types and do not use any of the keywords above.
However, there is a way that you can search through an arbitrary fileset: turn that list of files into a list of $include lines and then search on the that list using the $include option.
Here is a short command file that allows you to search a fileset.
parm filesetParm="@",searchString="" purge fileset,temp listfile !filesetParm > fileset,6 /t fileset /d 1/3 /d "~" (p) /c 1 "$include " @ if "!searchString" = "" then /lj $inc @ else /lj $inc "!searchString" endif
The second parameter, searchString, is the string you want to search on. This parameter is optional. The default is to list all the lines in each file.
listsetTo list the contents of all the MPE files whose names start with T:
listset t@To list only the lines containing the word Display in all MPE files with names starting with test:
listset test@,displayTo search all MPE and Posix files:
See also "how to edit files in a fileset".