search for strings in members

Upload: ashwin-reddy

Post on 03-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Search for Strings in Members

    1/3

    Search for Strings in Members

    The traditional way to search for a string inside PDS members is the searchforutility, 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 membernames. 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 ordatasetlist, 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 PDSto 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 frontof 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 donot 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. Idisplay only the first 72 bytes of each line, in order to fit better on the screen.

    Screen Shots:

    Screen1:Groupe Etudes

    Option ===> =3.14

    LGP: PDFICF USER: ETU134

    Choisissez une des options suivantes. PART: SY0 DATE: 01.09.03

    Pour paginer, faire UP ou DOWN (PF8 ou PF7) TIME: 16:53

    HLP DESCRIBE - Read a short description of the options on this panel0 X0 - Specify terminal and user paramaters

    1 BR - Browse

    2 ED - EDIT: create or change source data

    3 UT - Utilities: perform PDF Utility Functions

    4 FR - Invoke language processors in foreground

    6 CM - Enter TSO command or Clist

    7 DT - Perform dialog testing

    8 LM - Perform Library managment Utility Functions

    -

    D DIACAPP - Applications communes tous les utilisateurs DIAC

    A APPETU - Applications Etudes

    U UETU - Menu Users Etudes

    -

    J EJ - Spool Display and Search Facility

    B92 B92 - Archivage des SYSOUTs

    To view PF key definitions, type KEYS on COMMAND or OPTION line of any panel.

  • 7/28/2019 Search for Strings in Members

    2/3

    Screen2:

    Menu RefList Utilities Help

    ---------------------------------------------------------------------------------

    Search-For Utility

    Command ===>

    Search String . . 'ETU134'

    ISPF Library:

    Project . . .

    Group . . . . . . . . . . . . .

    Type . . . .

    Member . . . (Blank or pattern for member selection list,

    "*" for all members)

    Other Partitioned, Sequential or VSAM Data Set:

    Data Set Name . . .ETU134.RAM.PDS

    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 Execution Mode Output Mode

    Specify additional search strings 1 1. Foreground 1 1. View

    Mixed Mode 2. Batch 2. Browse

    Bypass selection list

    Press Enter

    It displays all the members present in the PDS.

    Menu Functions Utilities Help

    -----------------------------------------------------------------------------------

    SEARCH ETU134.RAM.PDS Row 00001 of 00035

    Command ===> Scroll ===> CSR

    Enter END command to process selections or CANCEL to leave the member list.

    Name Prompt Size Created Changed ID

    . COMPJCL 36 2003/03/13 2003/05/13 13:49:08 ETU134

    . C10F 147 1995/08/01 2003/06/17 13:47:27 ETU134

    . C11F 181 1995/07/31 2003/06/17 14:07:05 ETU134

    . C20FA 37 1994/06/15 2003/06/19 12:36:51 ETU134

    . C20FB 149 1994/06/15 2003/07/30 14:29:05 ETU134

    . C21FA 46 1995/09/12 2003/07/30 14:30:42 ETU134

    . C21FB 168 1995/09/12 2003/07/30 14:30:55 ETU134

    . C21FC 61 1995/09/12 2003/07/30 14:30:18 ETU134

    . C90F 88 1996/06/14 2003/07/28 09:48:08 ETU134

    . DOIT 2 2003/07/01 2003/08/27 17:19:06 ETU134

    . EUROTXTI 92 2003/07/14 2003/07/30 14:27:51 ETU134

    . IEBCOMPR 17 2003/07/14 2003/08/07 07:22:44 ETU134

    . IEBGENER 26 2003/07/14 2003/07/28 16:45:33 ETU134

    . JCL10 30 2001/02/27 2003/05/13 13:48:52 ETU134

    . KSA70P50 60 2003/05/13 2003/05/28 14:11:20 ETU134

    Enter the string u want to search

    Search output

    PDS U want search

  • 7/28/2019 Search for Strings in Members

    3/3

    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 Prompt Size Created Changed ID

    S COMPJCL 36 2003/03/13 2003/05/13 13:49:08 ETU134

    . C10F 147 1995/08/01 2003/06/17 13:47:27 ETU134

    . C11F 181 1995/07/31 2003/06/17 14:07:05 ETU134

    . C20FA 37 1994/06/15 2003/06/19 12:36:51 ETU134

    . C20FB 149 1994/06/15 2003/07/30 14:29:05 ETU134

    . C21FA 46 1995/09/12 2003/07/30 14:30:42 ETU134

    . C21FB 168 1995/09/12 2003/07/30 14:30:55 ETU134

    . C21FC 61 1995/09/12 2003/07/30 14:30:18 ETU134

    . C90F 88 1996/06/14 2003/07/28 09:48:08 ETU134

    . DOIT 2 2003/07/01 2003/08/27 17:19:06 ETU134

    . EUROTXTI 92 2003/07/14 2003/07/30 14:27:51 ETU134

    . IEBCOMPR 17 2003/07/14 2003/08/07 07:22:44 ETU134

    . IEBGENER 26 2003/07/14 2003/07/28 16:45:33 ETU134

    . JCL10 30 2001/02/27 2003/05/13 13:48:52 ETU134

    . KSA70P50 60 2003/05/13 2003/05/28 14:11:20 ETU134

    Type S to select the member of the data set.

    Type END command at the COMMAND== ENDPress Enter.

    Search result will come inETU134.SRCHFOR.LIST

    ***ALL THE BEST***