Escolar Documentos
Profissional Documentos
Cultura Documentos
The traditional way to search for a string inside PDS members is the searchfor utility, normally accessible in 3.14 ISPF menu. Although this method is fast and gives good results, you still have to move to that menu and type the search string and the PDS name, and perhaps also the member names. For quick searches and not very heavy ones, I developed an EXEC to perform the same task that is faster to use, since, when you are in 3.4 or datasetlist, you can simply type the EXEC's name and the string to search for in front of the PDS name For example, to search for the string 'andrew' in all PDS members, just go to 3.4. locate the PDS to search, and type in front of it: scanfile andrew The string should be quoted if it contains spaces. Also, if you want to limit the member names to search, just add that specification after the search string. Let's say you want to look for 'IF a = 35' in all the members whose names start with 'DU'. Just like in the previous example, type in front of the PDS name: scanfile "if a = 35" du* The asterisk at the end is optional. The search is not case sensitive. Unlike with searchfor, I do not put the results in a file, I just show them. The member names where the string was found are displayed on the screen, followed by the line number and the line text where the string occurs. I display only the first 72 bytes of each line, in order to fit better on the screen.
Screen2:
Menu RefList Utilities Help --------------------------------------------------------------------------------Search-For Utility Command ===> Enter the string u want to search Search String ISPF Library: Project . . Group . . . Type . . . Member . . . . 'ETU134' . . . .
. . .
. . .
. . .
(Blank or pattern for member selection list, "*" PDS for U all members) want search Other Partitioned, Sequential or VSAM Data Set: Data Set Name . . .ETU134.RAM.PDS Search output Volume Serial . . . (If not cataloged) Listing Data Set . . . ETU134.SRCHFOR.LIST Data Set Password . . (If Search-For data set password protected) Enter "/" to select option Specify additional search strings Mixed Mode Bypass selection list Execution Mode 1 1. Foreground 2. Batch Output Mode 1 1. View 2. Browse
. . . . . . . . . . . . . . .
Menu Functions Utilities Help -----------------------------------------------------------------------------------SEARCH ETU134.RAM.PDS Row 00001 of 00035 Command ===> END Scroll ===> CSR Enter END command to process selections or CANCEL to leave the member list. Name COMPJCL C10F C11F C20FA C20FB C21FA C21FB C21FC C90F DOIT EUROTXTI IEBCOMPR IEBGENER JCL10 KSA70P50 Prompt Size 36 147 181 37 149 46 168 61 88 2 92 17 26 30 60 Created 2003/03/13 1995/08/01 1995/07/31 1994/06/15 1994/06/15 1995/09/12 1995/09/12 1995/09/12 1996/06/14 2003/07/01 2003/07/14 2003/07/14 2003/07/14 2001/02/27 2003/05/13 Changed 2003/05/13 13:49:08 2003/06/17 13:47:27 2003/06/17 14:07:05 2003/06/19 12:36:51 2003/07/30 14:29:05 2003/07/30 14:30:42 2003/07/30 14:30:55 2003/07/30 14:30:18 2003/07/28 09:48:08 2003/08/27 17:19:06 2003/07/30 14:27:51 2003/08/07 07:22:44 2003/07/28 16:45:33 2003/05/13 13:48:52 2003/05/28 14:11:20 ID ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134 ETU134
S . . . . . . . . . . . . . .
Type S to select the member of the data set. Type END command at the COMMAND== END Press Enter.