SPI Scan

User's Guide

Copyright © 2001 by Software Pursuits, Inc.
All Rights Reserved.

Except as noted below, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without the prior written permission of Software Pursuits, Inc.

Table of Contents


Chapter 1 Using SPI Scan

The SPI Scan utility is used to scan the contents of library members for a given scan argument and report on matches found.

SPI Scan is only valid for operating systems that support the LIBR format library structure.

Control Statement Format

A single control statement read from SYSIPT drives the utility.

The format of the control statement is:

lib.sublib.mn.mt 'scanarg1'[lo'scanarg2']

Operands/Options

lib
The name of the library to be scanned. This is required.

sublib
The name of the sub-library to be scanned. This is required.

mn
The member name(s) to be scanned. This is required. Please see "Usage Notes" below for additional information on specifying the member name.

mt
The member type to be used for the scan. This is required.

scanarg1
Indicates the character string to be scanned for. The character string is set in single quotes.
  • Typing the quote twice indicates a single quote within the string.
  • Placing an "X" at the beginning of the scan argument indicates hexadecimal data.

lo
A logical operator that is required with scanarg2. Valid operators are:
  • | - OR
  • & - AND
  • Software Pursuits - AND NOT

scanarg2
Indicates the character string to be scanned for. The character string is set in single quotes.
  • Typing the quote twice indicates a single quote within the string.
  • Placing an "X" at the beginning of the scan argument indicates hexadecimal data.

Usage Notes

Specifying Member Names

When specifying member names to SPI Scan, please note the following:

  1. If you wish to scan all member names for a specific member type, simply enter an asterisk (*) in the member name field.

  2. By default, an asterisk (*) is appended to the member name. This means that any member name matching the specified portion will be selected for scanning. For example:

    
    lib.sublib.DDA.A
    

    would select all "A" member types that begin with the characters "DDA". This would be the same as coding "DDA*".

  3. A percent sign (%) may be used as a wildcard in any position of a member name that is to be ignored. For example:

    
    lib.sublib.TPL%0.C
    

    would select all members whose name began with "TPL", had a "0" in position 5 and had any character in position 4.

Other Notes

  1. The operands are separated by one or more blanks and may start in any column.

  2. Member types DUMP, PHASE and OBJ are not supported.

  3. Member type * is not allowed

  4. Results of the scan are printed on SYSLST.

  5. The scan argument is displayed in up-down hexadecimal and character format. If a match is found, the member name is displayed and each line of the member containing a match is displayed along with the line number.

  6. If the scan argument is provided in hexadecimal format, the member lines will be displayed in up-down hexadecimal and character format.

  7. If the scan argument is given in character format, the member lines will be displayed in character format delimited by bar (|) on each end of the line.

Examples

  1. Scans all PROCs beginning with "PY" in sub-library IJSYSRS.SYSLIB for "MASTER"

    
    // EXEC SPISCAN
    IJSYSRS.SYSLIB.PY.PROC 'MASTER'
    /*
    

  2. Scans all PROCs beginning with "$" and having "JCL" in the third to fifth character positions for "DLBL"

    
    // EXEC SPISCAN
    IJSYSRS.SYSLIB.$%JCL.PROC 'DLBL'
    /*
    

  3. Scans all members of type "A" in sub-library MYLIB.STUFF for the character string "THIS" or "THAT".

    
    // EXEC SPISCAN
    MYLIB.STUFF.*.A 'THIS'|'THAT'
    /*
    

  4. Scans all members of type "SOU" with "A" and "C" in the first and third character positions for lines containing the character string "IT'S" but not the hex data string "89A3".

    
    // EXEC SPISCAN
    ABCLIB.SUB1.A%C.SOU 'IT''S'ŘX'89A3'
    /*
    

Output Example

This example shows the output from a sample scan. The listing will report the input control statement used for the scan as well as the character and hexadecimal representations of the scan arguments.

Each member name that matches the member name specified is displayed. Every line that contains the specified scan argument(s) is also displayed along with its associated line number in the member.


Input control statement:
 
IJSYSRS.SYSLIB.$%J.PROC 'SYS001'|'SYSLNK'
 
Output listing:
 
SPISCAN - Scanning IJSYSRS.SYSLIB, member name(s) $%J*, of type PROC.
          Scan data follows:
Zone EEEFFF
 Num 282001
Char SYS001
 
 OR
 
Zone EEEDDD
 Num 282352
Char SYSLNK
 
Member=$AJCLIGF
Line       5 Data |ASSGN SYSLNK,DISK,VOL=VSE41R,SHR           SYSTEM LINK FILE                  |
Line       6 Data |ASSGN SYS001,DISK,VOL=VSE41W,SHR           SYSTEM WORK FILE 1                |
 
Member=$AJCLISM
Line       5 Data |ASSGN SYSLNK,DISK,VOL=VSE41R,SHR           SYSTEM LINK FILE                  |
Line       6 Data |ASSGN SYS001,DISK,VOL=VSE41W,SHR           SYSTEM WORK FILE 1                |
 
Member=$1JCL3
Line       4 Data |// EXTENT SYS001,V31RES,1,0,1890,30                                          |
 
Member=$1JCPNA1
Line       4 Data |// EXTENT SYS001,VSE41R,1,0,4380,60                                          |
Line       8 Data |// ASSGN SYS001,DISK,VOL=VSE41R,SHR                                          |
 
Member=$7JCLI32
Line       5 Data |ASSGN SYSLNK,DISK,VOL=VSE41R,SHR           SYSTEM LINK FILE                  |
Line       6 Data |ASSGN SYS001,DISK,VOL=VSE41W,SHR           SYSTEM WORK FILE 1                |
 
Member=$7JCLI35
Line       5 Data |ASSGN SYSLNK,DISK,VOL=VSE41R,SHR           SYSTEM LINK FILE                  |
Line       6 Data |ASSGN SYS001,DISK,VOL=VSE41W,SHR           SYSTEM WORK FILE 1                |
 
Member=$9JCPNK1
Line       5 Data |ASSGN SYSLNK,DISK,VOL=VSE41R,SHR           SYSTEM LINK FILE                  |
Line       6 Data |ASSGN SYS001,DISK,VOL=VSE41W,SHR           SYSTEM WORK FILE 1                |
 
Totals: 13 matches found in 7 members scanned.

Chapter 2 Restoring the SPI Scan Distribution Tape

SPI Scan is distributed on a tape containing a LIBR backup of sub-library SPITOOL.SPI Scan. This sub-library contains the single phase, SPI Scan, requiring 9 blocks of library space.

The phase may be restored using the following:


// MTC REW,cuu   <—address of tape unit holding the distribution tape
// EXEC LIBR
RESTORE SUBLIB=SPITOOL.SPI Scan : yourlib.newsub TAPE=. . .
/*

Refer to IBM VSE/Enterprise Systems Architecture System Control Statements (SC33-6613-00) for details on the use of the Librarian RESTORE command.

  1500 Fashion Is. Blvd., Suite 205
San Mateo, CA 94404
Phone: 650-372-0900
Fax: 650-372-2912

Copyright © 2000 by Software Pursuits, Inc.
All rights reserved