Skip to content

About Cross Application Scan

The library scan facility searches baseline level 0 libraries for character strings and component dependencies:

For any character string, you can further specify:

  • Whether the search is case sensitive.

  • The record positions to examine for the string.

  • Two strings with a boolean OR or AND relationship.

Component dependencies include:

  • The copybook members that like-source components or other copybooks reference.

  • The names of subroutines that like-source components call.

  • Program names, procedure names, and data set names that are referenced in JCL and procedure libraries.

You can include multiple library types and multiple applications in a single scan request.

Note

Unlike the impact analysis function, which obtains its information from relationship records in the impact analysis data space, the scan utility scans the members in target libraries looking for characters strings such as COPY or CALL to find copybook or subprogram references respectively.

Requesting a Scan

You can use the Library Scan utility to scan baseline libraries or a specific package’s staging libraries.

To request a scan:

  1. Select Option 1 Build from the Primary Option Menu. In response, the Build Options

    CMNBUILD                Build Options
    Option ===> _______________________________________________
    
    0 Dates         Display the installation calendar
    1 Create        Create a new package
    2 Update        Update package information
    3 Forms         Create, update, approve or review online forms
    4 Utility       Rename and scratch information
    5 Checkout      Check out components from baseline or promotion
    6 Stage         Stage, edit, browse and delete components
    7 Audit         Audit a package
    8 Recompile     Recompile source code from baseline or promotion
    9 Rebind        Rebind load modules
    B Browse        Browse, print, copy baseline or promotion
    C Compare       Compare staging to baseline or promotion
    L Listing       Browse compressed listings
    S Scan          Scan baseline for character strings
    Z Compress      Compress change package staging libraries
    
  2. Select Option S Scan from the Build Options menu. The Library Scan Utility (CMNSCN01) panel appears.

CMNSCN01                    Library Scan Utility
Command ===> _______________________________________________________

Package . . . . . . . . . TEST001852_
Application . . . . . . . ___       (Blank for list)
Library type . . . . . .  JCL_      (Blank for list)
Scan mode . . . . . . . . 1_        (1-Online, 2-Batch, 3-Alt Batch)
Records to select . . . . 0_        (0 = all)

Enter "/" to select option
___ List member names only
___ Scan for dependencies
___ Case sensitive

Displacement:
    From . . . 0_ (0=all)           To . . . . . 0 (max=80)
Components to scan:                 (Blank for all components)
    Begin . . ._______________      End . . . .     ________________
Data strings:
cobol ________________________              OR_     (and/or)
  __________________________

The panel has the following fields:

Package

Enter the package name.

Application

Fill in the application name. You can:

  • Specify a complete application name to restrict the scan to that application.

  • Specify a pattern ending in an asterisk to request that all applications that match the pattern be included in the scan. For example, APP* will include all applications whose names begin with APP.

  • Leave this field blank and press Enter to display the Application Selection List panel from which you can select the applications that you want to include in the scan.

Library type

Fill in the library type mnemonic. You can:

  • Specify a specific library type to restrict the scan to that library type.

  • Specify a pattern ending in an asterisk to request that all library types that match the pattern be included in the scan. For example, S* will include all library types whose mnemonics begin with the letter S.

  • Leave this field blank and press Enter to display the Library Type Selection List panel from which you can select the library types that you want to include in the scan.

You cannot scan a like-load library type, even though they appear on the Library Type Selection List panel.

Scan mode

Specify whether the scan is executed online or in a batch job: See Online and Batch Execution Modes

  • Enter 1 to perform the scan and display the data in an online mode.

  • Enter 2 to submit a batch job for the scan and display the data in the SYSPRINT DD.

  • Enter 3 to submit an alternative batch job where the scan activity takes place in the local machine rather than the server. |

Records to select

Enter the number of output records to display:

0: Display all records that match the scan criteria.

n: Display up to n records that have been retrieved.

This value determines the number of target records that are included in the displayed output. (It does not limit the number of record hits that scan retrieves.)

List member names only

Select this to specify to display only the library member names and associated data that meet the scan criteria, or omit to display the names of the library members and the data that meets the scan criteria.

Scan for dependencies

Specify whether or not to scan members for component dependencies or data strings.

Scan for component dependencies. The dependencies that are displayed depend on the library type, as follows:

Libtype Dependencies Displayed
Like-copy Copybook members with embedded copy statements.
Like-source Copybooks that like-source members reference and the subroutines that like-source components call.
JCL or proc Displays program names, procedure names, and data set names that are referenced in JCL and procedure library members.

You can scan an LCT library for data strings but not component dependencies.

Scan for a data string or strings. You need to supply a value for Data string as a minimum.

Selecting Dependencies is mutually exclusive with specifying a value for the Data Strings.

Case sensitive?

Select this to specify the scan for a data string is to be case sensitive exactly as typed, otherwise any case will be reported, upper, lower or mixed case.

Displacement

Enter the starting (From) and ending (To) character positions to search in each record. Type 7 for column 7, 36 for column 36, and so on. Type 0 in the From and To fields to search all positions in the record.

Components to scan

Enter the Begin and End member name to specify a range of members to scan:

  • To scan all members, leave the Begin and End fields blank.

  • To scan a single member, type its name in the Begin field. Leave the End field blank.

  • To limit the search to members that match a pattern, type a pattern (such as ABC*) in the Begin field. ChangeMan ZMF ignores the End field value.

You can type a range, such as MEMBERA for Begin and MEMBERZ for End even if the members do not exist in the data set. All members that fall within the specified name range will be scanned.

Data strings

Enter the string or strings to search for.

Do not enclose a string containing embedded blanks or nonalphabetic characters in single quotes.

Enclose a string that contains leading or trailing blanks in single quotes.

These fields are ignored if you select Scan for dependencies.

and/or

If you specify a value for the second Data string, specify if you want the two Data strings to be ANDed or ORed.

Selecting Applications

The Application Selection List (CMNSCN04) panel is displayed if you leave the Application field blank on the preceding Library Scan Utility panel:

```
CMNSCN04        Application Selection List              Row 1 to 3 of 3
Command ===>                                           Scroll ===> CSR

   Appl Description                     Request
__ ACTP ACTP Accounts Payable (Base ZMF)
__ COMM COMM Common Components (Base ZMF)
__ GENL GENL General Ledger (Db2 Option)
******************************* Bottom of data ********************************
```

Note

Only the applications that your security system has authorized for your TSO userid are included in the application list.

Use this panel as follows:

  1. Type the letter S in the selection field to the left of each application that you want to include in the scan. (If you make a selection error, you can type the letter D (deselect) in the selection field to deselect the application.)

  2. When you have selected all desired applications, press Enter. (If you press PF3 at this point before you press Enter, no applications are selected and you are returned to the Library Scan Utility panel). After you press Enter, the text *SELECT* will appear in the REQUEST column to indicate that you have selected the corresponding application. The following example indicates that application ACTP has been selected.

    CMNSCN04            Application Selection List          Row 1 to 3 of 3
    Command ===> _________________________________________ Scroll ===> CSR
    
       Appl Description                             Request
    __ ACTP ACTP Accounts Payable (Base ZMF)        *SELECT*
    __ COMM COMM Common Components (Base ZMF)
    __ GENL GENL General Ledger (Db2 Option)
    ******************************* Bottom of data ********************************
    
  3. Press PF3 to return to the Library Scan Utility panel after you have selected the desired applications.

Selecting Library types

The Library Type Selection List (CMNSCN05) panel is displayed if you leave the Library Type field blank on the preceding Library Scan Utility panel:

CMNSCN05            Library Type Selection List         Row 1 to 26 of 26
Command ===> ___________________________________________   Scroll ===> CSR

   Lib Description                             Request
__ CPY Copybooks
__ CP2 Copybooks for Utilities
__ CTC Control Statements
__ DBR DBRM
__ DOC Documentation
__ HTH zFS resident HTML
__ JAR Java Archives
__ JAV Java source
__ JCF Java Class files
__ JCL Execution JCL
__ JCT Java JAR Build Control
__ LCT Linkedit Control Cards
__ LOD Executable Load Modules
__ LOS Load for Subprograms to be Linked NCAL
__ LSH zFS Listings
__ LST Compressed Stage listings
__ OBJ Object module library
__ PRC Cataloged Procedures
__ SRC Source for Programs to be Linked Executable
__ SRS Source for subprograms to be Linked NCAL
__ TST Test Library type
__ WAR Java Web Archives
__ WCT Java WAR Build Control
__ ZCP Shared Baseline Components
__ ZLS Shared Baseline Subprogram Load (NCAL)
__ ZSS Shared Baseline Subprogram Source
******************************* Bottom of data ********************************

This panel lists, in alphanumeric order, all library types that are defined for all the applications you have selected. If the same library type is defined in more than one application, only one entry (the first one encountered) for the library type is included in the list.

Use this panel as follows:

  1. Type the letter S in the selection field to the left of each library type that you want to include in the scan.

  2. When you have selected all desired library types, press Enter. (If you press PF3 at this point before you press Enter, no library types are selected and you are returned to the Library Scan Utility panel.) After you press enter, the text *SELECT* appears in the REQUEST column to indicate that you have selected the corresponding library type. The following example indicates that all library types have been selected.

CMNSCN05            Library Type Selection List             Row 1 to 26 of 26
Command ===>_______________________________________________  Scroll ===> CSR

   Lib Description                                         Request
__ CPY Copybooks                                           *SELECT*
__ CP2 Copybooks for Utilities
__ CTC Control Statements
__ DBR DBRM
__ DOC Documentation
__ HTH zFS resident HTML
__ JAR Java Archives
__ JAV Java source
__ JCF Java Class files
__ JCL Execution JCL
__ JCT Java JAR Build Control
__ LCT Linkedit Control Cards
__ LOD Executable Load Modules
__ LOS Load for Subprograms to be Linked NCAL
__ LSH zFS Listings
__ LST Compressed Stage listings
__ OBJ Object module library
__ PRC Cataloged Procedures
__ SRC Source for Programs to be Linked Executable         *SELECT*
__ SRS Source for subprograms to be Linked NCAL            *SELECT*
__ TST Test Library type
__ WAR Java Web Archives
__ WCT Java WAR Build Control
__ ZCP Shared Baseline Components
__ ZLS Shared Baseline Subprogram Load (NCAL)
__ ZSS Shared Baseline Subprogram Source
******************************* Bottom of data ********************************

Use Case Scenarios

The use cases in this section illustrate how to use the library scan facility.

Scanning for a Data String

In this scenario, assume you know that several jobs access a data set named PROD.DATA.SET.NAME for input. You want to change the name of the data set that these jobs use for input. Therefore, you use the scan facility to scan all JCL and procedure libraries for references to this data set. Take the following steps:

  1. Select Option 1 Build from the Primary Option Menu. Then, select Option S Scan on the Build panel to bring up the Library Scan Utility (CMNSCN01) panel.

  2. Fill in the Library Scan Utility panel as shown below:

    • Leave the Application field blank because you want to include the libraries of multiple applications in the scan.

    • Leave the Library Type field blank because you want to include multiple library types in the scan.

    • Do not select Dependencies, because you want to scan the selected library types for a data string ACPCPYC. (You do not want to scan for component dependencies.)

    • Specify ACPCPY for the first Data string.

    CMNSCN01                  Library Scan Utility
    Command ===> ____________________________________________________
    
    Package . . . . . . . . . ________
    Application . . . . . . . ______  (Blank for list)
    Library type . . . . . .  _____   (Blank for list)
    Scan mode . . . . . . . . 1_      (1-Online, 2-Batch, 3-Alt Batch)
    Records to select . . . . 0____   (0 = all)
    
    Enter "/" to select option
     __ List member names only
     __ Scan for dependencies
     /_ Case sensitive
    
    Displacement:
    From . . . 0_   (0=all)             To . . . . . 0_ (max=80)
    Components to scan:                 (Blank for all components)
      Begin . . . ______________________  End . . . .__________________
    Data strings:
      ACPCPYC                                     OR (and/or)
    _________________________________
    _________________________________
    
  3. Press Enter to bring up the Application Selection List (CMNSCN04) panel.

  4. Type the letter S in the line command field to select the ACTP and GENL applications.

    CMNSCN04                Application Selection List          Row 1 to 3 of 3
    Command ===>_______________________________________________ Scroll ===> CSR
    
    
       Appl Description                             Request
    s  ACTP ACTP Accounts Payable (Base ZMF)
    __ COMM COMM Common Components (Base ZMF)
    s  GENL GENL General Ledger (Db2 Option)
    ******************************* Bottom of data ********************************
    
  5. Press Enter to complete the selection. The word *SELECT* will appear in the Request column for the selected applications.

  6. Press PF3 (END) to display the Library Type Selection List (CMNSCN05) panel.

  7. Type the letter S in the line command field to select the SRC and SRS libraries:

    CMNSCN05            Library Type Selection List             Row 1 to 37 of 37
    Command ===> ______________________________________________  Scroll ===> CSR
    
       Lib Description                     Request
    __ CPY Copybooks
    __ CP2 Copybooks for Utilities
    __ CTC Control Statements
    __ DBB Db2 BIND PLAN Commands
    __ DBR DBRM
    __ DOC Documentation
    __ HTH zFS resident HTML
    __ JAR Java Archives
    __ JAV Java source
    __ JCF Java Class files
    __ JCL Execution JCL
    __ JCT Java JAR Build Control
    __ LCT Linkedit Control Cards
    __ LDB Db2 Program Load
    __ LOD Executable Load Modules
    __ LOS Load for Subprograms to be Linked NCAL
    __ LSH zFS Listings
    __ LST Compressed Stage listings
    __ OBJ Object module library
    __ PKG Db2 Bind Package Commands
    __ PRC Cataloged Procedures
    __ SDB Db2 Program Source
    __ SPD Db2 Stored Proc Definitions - Non-SQL
    __ SPN Db2 Stored Proc Source - Native SQL
    __ SPQ Db2 Stored Proc Source - SQL Language
    s  SRC Source for Programs to be Linked Executable
    s  SRS Source for subprograms to be Linked NCAL
    __ STL Db2 Stored Proc Load Modules
    __ STP Db2 Stored Proc Source - External Lan
    __TRG Db2 Trigger Definitions
    __ TST Test Library type
    __UDF Db2 User-Defined Function Definitions
    __ WAR Java Web Archives
    __WCT Java WAR Build Control
    __ ZCP Shared Baseline Components
    __ZLS Shared Baseline Subprogram Load (NCAL)
    __ ZSS Shared Baseline Subprogram Source
    *******************************Bottom of data********************************
    
  8. Press Enter to complete the selection. The word *SELECT* will appear in the Request column for the selected library types, and the last one selected will be at the top of the screen.

  9. Press PF3 (END) to initiate the scan.

Here’s an excerpt from the scan report that is displayed online:

CMNSCN03        SCAN RESULTS                        ROW 1 TO 39 OF 47
Command ===>______________________________________    Scroll ===> CSR
********************************* TOP OF DATA **********************************
Appl=ACTP LibType=SRC Baseline=CMNTP.S6.V810.BASE.ACTP.SRC

<***MEMBER ACPSRCCA***>
        COPY ACPCPYCA.                                          000023
        COPY ACPCPYCB.                                          000024
- CALL 'ACPSRSCB' USING ACPCPYCB.                         000031

<***MEMBER ACPSRCCC***>
        COPY ACPCPYCC.                                          000018
        COPY ACPCPYCD.                                          000019
- CALL 'ACPSRSCD' USING ACPCPYCD.                         000026

<***MEMBER ACPSRCCE***>
        COPY ACPCPYCE.                                          000018
        COPY ACPCPYCF.                                          000019
- CALL 'ACPSRSCF' USING ACPCPYCF.                         000026

<***MEMBER DENISE***>
        COPY ACPCPYCA.                                          000023
        COPY ACPCPYCB.                                          000024
- CALL 'ACPSRSCB' USING ACPCPYCB.                         000031

<***MEMBER TESTCO01***>
- COPY ACPCPYCB.                                          000024
- CALL 'ACPSRSCB' USING ACPCPYCB.                         000031

***26 members scanned***
***5 member hits***
***14 record hits***

Appl=ACTP LibType=SRS Baseline=CMNTP.S6.V810.BASE.ACTP.SRS

***Scan found no matches for this criteria***

Appl=GENL LibType=SRC Baseline=CMNTP.S6.V810.BASE.GENL.SRC

***Scan found no matches for this criteria***

Appl=GENL LibType=SRS Baseline=CMNTP.S6.V810.BASE.GENL.SRS

***Scan found no matches for this criteria***

***1.74 seconds elapsed time
******************************** BOTTOM OF DATA ********************************
  • A separate section for each application/libtype is displayed in the scan output in application/libtype sequence.

Each section has the following components:

  • Header that names the application, library type, and data set name of the target baseline library.

  • Name of each member that has a match for the specified scan criteria.

  • The statement or statements within each library member in which the specified data string was found. (These details are omitted if you selected the option to List member names only on the Library Scan Utility panel).

  • Statistics that show:

  • The number of members in the target application/library type that were scanned.

  • The number of members that have a match for the specified scan criteria.

  • The number of matching records displayed in the report output (not shown in the above excerpt).

The excerpt in the above example shows that six members of the SRC library type for the ACTP application reference the data string ACPCPYC.

If a specified library type does not exist for an application or if there are no matches in the target library type for the specified scan criteria, the following message is displayed for that application/libtype:

    *** Scan found no matches for this criteria ***

The end of the report shows the elapsed time that the scan utility used to complete the scan request.

Listing Members Only in Scan Output

The example in this scenario is the same as in the preceding scenario except that you request that the scan output list only member names and not the associated data.

  1. Fill in the Library Scan Utility panel as shown below:

    • Leave the Application field blank because you want to select the libraries of multiple applications.

    • Leave the Library Type field blank because you want to request that multiple library types be included in the scan.

    • Select the option List member names only.

    • Do not select Dependencies, because you want to scan the selected library types for the data string ACPCPYC. (You do not want to scan for component dependencies.)

    • Specify ACPCPYC for the first Data string.

    CMNSCN01                Library Scan Utility
    Command ===> ________________________________________________________
    
    Package . .. . . . . . . ______
    Application . . . . . . .______ (Blank for list)
    Library type . . . . . . ______ (Blank for list)
    Scan mode . . . . . . .  1_     (1-Online, 2-Batch, 3-Alt Batch)
    Records to select . . .  0_____ (0 = all)
    
    Enter "/" to select option
     /_ List member names only
     __ Scan for dependencies
     /_ Case sensitive
    
    Displacement:
       From . . . 0__(0=all)       To . . . . . 0__ (max=80)
    Components to scan:            (Blank for all components)
       Begin . . .________________ End . . . .__________________
    Data strings:
    ACPCPYC___________________________    OR__ (and/or)
    __________________________________
    
  2. Press Enter to bring up the Application Selection List (CMNSCN04) panel.

  3. Enter the letter S in the line command field to select the ACTP application. (If you select the wrong application by mistake, you can type the letter D in the line comand field to deselect the application.)

    CMNSCN04     A  pplication Selection List           Row 1 to 3 of 3
    Command ===> _____________________________________ Scroll ===> CSR  
    
    Appl   Description Request
    s ACTP ACTP Accounts Payable (Base ZMF)
    __COMM COMM Common Components (Base ZMF)
    __GENL GENL General Ledger (Db2 Option)
    *******************************Bottom of data********************************
    
  4. Press Enter to complete the selection. The word *SELECT* will appear in the Request column for the selected applications.

  5. Press PF3 (END) to display the Library Type Selection List (CMNSCN05) panel.

  6. Enter the letter S in the line command field to select the libraries you want.

    CMNSCN05                Library Type Selection List         Row 1 to 26 of 26
    Command ===>________________________________________________ Scroll ===> CSR
    
       Lib Description                          Request
    __ CPY Copybooks
    __ CP2 Copybooks for Utilities
    __ CTC Control Statements
    __ DBR DBRM
    __ DOC Documentation
    __ HTH zFS resident HTML
    __ JAR Java Archives
    __ JAV Java source
    __ JCF Java Class files
    __ JCL Execution JCL
    __ JCT Java JAR Build Control
    __ LCT Linkedit Control Cards
    __ LOD Executable Load Modules
    __ LOS Load for Subprograms to be Linked NCAL
    __ LSH zFS Listings
    __ LST Compressed Stage listings
    __ OBJ Object module library
    __ PRC Cataloged Procedures
    s  SRC Source for Programs to be Linked Executable
    __ SRS Source for subprograms to be Linked NCAL
    __ TST Test Library type
    __ WAR Java Web Archives
    __ WCT Java WAR Build Control
    __ ZCP Shared Baseline Components
    __ ZLS Shared Baseline Subprogram Load (NCAL)
    __ ZSS Shared Baseline Subprogram Source
    ******************************* Bottom of data ********************************
    
  7. Press Enter to complete the selection. The word *SELECT* will appear in the Request column for the selected library types.

  8. Press PF3 (END) to initiate the scan.

Here’s the output from the scan report that is displayed online:

CMNSCN03             SCAN RESULTS           ROW 1 TO 20 OF 20
Command ===>_______________________________  Scroll ===> CSR
********************************* TOP OF DATA **********************************
Appl=ACTP LibType=SRC Baseline=CMNTP.S6.V810.BASE.ACTP.SRC

***Member list only***

ACPSRCCA
ACPSRCCC
ACPSRCCE
TEST01
TESTCO01

...

Appl=ACTP LibType=SRS Baseline=CMNTP.S6.V810.BASE.ACTP.SRS

***Scan found no matches for this criteria***

***0 members scanned***
***0 member hits***

*** 0.72 seconds elapsed time

******************************** BOTTOM OF DATA********************************

Note that only the members with the specified data string (but no data records) are listed in the scan output.

Scanning for Dependencies

The following scenario shows how to scan baseline libraries for copybook-to-copybook, source-to-copybook, and source-to-subprogram dependencies. In the scenario, you restrict the scope to the scan to the CPY, SRC, and SRS (like-source) library types.

  1. Fill in the Library Scan Utility panel as follows:

    • Specify GENL for the Application.

    • Leave the Library Type blank to display a list of library types from which you can select.

    • Select Scan for dependencies.

    • Omit any Data string values because the data string scan is mutually exclusive with the component dependency scan:

       CMNSCN01                     Library Scan Utility
       Command ===>______________________________________________
    
       Package . . . . . . .. .. _____________
       Application . . . . . . . GENL      (Blank for list)
       Library type . . . . . .  _____     (Blank for list)
       Scan mode . . . . . . . . 1         (1-Online, 2-Batch, 3-Alt Batch)
       Records to select . . . . 0____     (0 = all)
    
       Enter "/" to select option
      __ List member names only
      /_ Scan for dependencies
      /_  Case sensitive
    
       Displacement:
      From . . . 0 (0=all)         To . . . . . __(max=80)
       Components to scan:            (Blank for all components)
      Begin . . . __________       End . . . . _____________
       Data strings:
       ___________________________________ OR (and/or/bth)
       ___________________________________
    
  2. Press Enter. The Library Type Selection List (CMNSCN05) panel appears. You select the CPY, SRC, and SRS library types because you want to see the copybooks that are referenced by members of these library types and the subprograms that members of the SRC and SRS library types call.

                Library Type Selection List             Row 1 to 26 of 29
    Command ===> ______________________________________   Scroll ===> CSR
    
       Lib Description                                      Request
    s  CPY Copybooks
    __ CTC Control Statements
    __ DBB Db2 BIND PLAN Commands
    __ DBR Db2 DBRM
    __ DOC Documentation
    __ JCL Execution JCL
    __ LCT Linkedit Control Cards
    __ LDB Db2 Program Load
    __ LOD Executable Load Modules
    __ LOS Load for Subprograms to be LinkedNCAL
    __ LST Compressed Stage listings
    __ PKG Db2 Bind Package Commands
    __ PRC Cataloged Procedures
    __ SDB Db2 Program Source
    __ SPD Db2 Stored Proc Definitions - Non-SQL
    __ SPN Db2 Stored Proc Source - Native SQL
    __ SPQ Db2 Stored Proc Source - SQL Language
    s  SRC Source for Programs to be Linked Executable
    s  SRS Source for subprograms to be Linked N
    __ STL Db2 Stored Proc Load Modules
    __ STP Db2 Stored Proc Source - External Lan
    __ TRG Db2 Trigger Definitions
    __ UDF Db2 User-Defined Function Definitions
    __ ZCP Shared Baseline Components
    __ ZLS Shared Baseline Subprogram Load (NCAL)
    __ ZSS Shared Baseline Subprogram Source
    ******************************* Bottom of data *****************************
    
  3. Press Enter. The text *SELECT* will appear in the Request column for the selected library types.

  4. Press PF3 (END) to initiate the scan request.

Here is an example of scan output that is displayed online:

...

Appl=GENL LibType=CPY Baseline=CMNTP.S6.V810.BASE.GENL.CPY

<***MEMBER GNLCPY1A***>
COPY        GNLCPY1X                                            000005

<***MEMBER GNLCPY5A***>
COPY        GNLCPY1X                                            000005

***11 members scanned***
***2 member hits***
***2 record hits***

Appl=GENL LibType=SRC Baseline=CMNTP.S6.V810.BASE.GENL.SRC

...

<***MEMBER COBOL002***>
COPY        CPY001                                              000011

<***MEMBER GNLSRC1A***>
COPY        GNLCPY00                                            000016
COPY        GNLCPY1A                                            000017
COPY        GNLCPY1B                                            000018
CALL        GNLSRS00                                            000024
CALL        GNLSRS1B                                            000025

<***MEMBER GNLSRC99***>
COPY        GNLCPY99                                            000016

***4 members scanned***
***3 member hits***
***7 record hits***

Appl=GENL LibType=SRS Baseline=CMNTP.S6.V810.BASE.GENL.SRS

<***MEMBER GNLSRS00***>
COPY        GNLCPY00                                            000018

<***MEMBER GNLSRS01***>
COPY        GNLCPY01                                            000018

<***MEMBER GNLSRS1B***>
COPY        GNLCPY00                                            000019
COPY        GNLCPY1C                                            000020
COPY        GNLCPY1B                                            000022
CALL        GNLSRS00                                            000026
CALL        GNLSRS1C                                            000027

<***MEMBER GNLSRS1C***>
COPY        GNLCPY00                                            000018
COPY        GNLCPY1C                                            000020
CALL        GNLSRS00                                            000024

<***MEMBER GNLSRS5A***>
COPY        GNLCPY00                                            000017
COPY        GNLCPY5A                                            000018
COPY        GNLCPY5B                                            000019
CALL        GNLSRS00                                            000025
CALL        GNLSRS5B                                            000026

<***MEMBER GNLSRS5B***>
COPY        GNLCPY00                                            000017
COPY        GNLCPY5C                                            000018
COPY        GNLCPY5B                                            000020
CALL        GNLSRS00                                            000024
CALL        GNLSRS5C                                            000025

<***MEMBER GNLSRS5C***>
COPY        GNLCPY00                                            000017
COPY        GNLCPY5C                                            000019
CALL        GNLSRS00                                            000023

***7 members scanned***
***7 member hits***
***23 record hits***

***1.31 seconds elapsed time
*

The grouping shown in bold in the above example shows that:

  • Member GNLSRC1A of the SRC library type for the GENL application references the GNLCPY00, GNLCPY1A and GNLCPY1B copybooks, and calls two subprograms GNLSRS00 and GNLSRS1B.

Requesting a Batch Scan

This scenario simply looks for SRS dependencies except that you submit the request for execution as a batch job. You can use the Library Scan utility to scan baseline libraries or package staging libraries.

  1. Fill in the Library Scan Utility panel as per example below, ensuring that you change the Scan mode from 1 to 2:

    CMNSCN01                    Library Scan Utility
    Command ===>
    
    Package . . . . . . . . .   _____________
    Application . . . . . . .   ACTP_    (Blank for list)
    Library type . . . . . .    SRS_     (Blank for list)
    Scan mode . . . . . . . .   2_       (1-Online, 2-Batch, 3-Alt Batch)
    Records to select . . . .   0____    (0 = all)
    
    Enter "/" to select option
      __ List member names only
      /_ Scan for dependencies
      /_ Case sensitive
    
    Displacement:
      From . . . 0_ (0=all)                To . . . . 0__ (max=80)
    Components to scan:                   (Blank for all components)
      Begin . . .                         End . . . .
    Data strings:
        ________________________________       OR_ (and/or)
        ________________________________
    
  2. Press Enter to bring up the Batch Baseline Scan Job Statements panel (CMNSCN02). This panel shows:

    • The application that you selected in the Application field (If you selected more than one then only the first one will be shown).

    • The library type that you selected in the Library Type field. (If you selected more than one then the first one will be shown).

    • Job statements for the Batch Baseline Scan job.

                    Batch Baseline Scan Job Statements
    Command ===>__________________________________________
    
    Application: ACTP
    Library type: CPY
    
    Job statement information:
    //USER015A JOB (SM-1IKF-SM),'SCAN',
    //      CLASS=A,MSGCLASS=X,NOTIFY=USER015
    //*
    //* JOB TO SCAN
    
  3. Press Enter to submit the job.

Scan writes the output for the job to the SYSPRINT DD. You can use a facility such as the Spool Display and Search Facility (SDSF) to view the output.

Batch Output

The output from a batch scan appears in the SYSPRINT data set. Here’s an example:

...

ChangeMan(R) ZMF        CMNBSCAN - 8.1.0 2015/01/30 03:38:18
Session established with ChangeMan ZMF Started task.

Criteria for this Scan:
Application              :ACTP
Library Type            :SRS
Scan for Dependencies
Case Sensitive
Records Selected        :ALL
Starting displacement   :1
Ending displacement     :80
Starting member         :First Member
Ending member           :Last Member
Dataset Organization    :PDS
Dataset Name to Scan    :CMNTP.S6.V810.BASE.ACTP.SRS

<***MEMBER ACPSRS00***>
COPY            ACPCPY00                                    000018

<***MEMBER ACPSRS1B***>
COPY            ACPCPY00                                    000016

COPY            ACPCPY1C                                    000017

COPY            ACPCPY1B                                    000019

CALL            ACPSRS00                                    000023

CALL            ACPSRS1C                                    000024

<***MEMBER ACPSRS1C***>
COPY            ACPCPY00                                    000014

COPY            ACPCPY1C                                    000016
CALL            ACPSRS00                                    000019

***3 members scanned***
***3 member hits***
***9 record hits***
***0.07 seconds elapsed time***

Session terminated with ChangeMan ZMF Started task.
******************************** BOTTOM OF DATA********************************

The batch output contains a separate section for each application/library type that is included in the scan. Each section includes:

  • Header that identifies the parameters used to scan the target application/library type.

  • Name of each library member where a hit occurs.

  • The details of the hit (omitted if List Members Only is selected).

  • Statistics that identify:

  • The number of members scanned in the target application/library type.

  • The number of member hits.

  • The total number of record hits in the members.

  • The elapsed time taken to complete this portion of the scan request.

Reviewing Batch SYSIN Input

You can review the SYSIN input to the scan utility to confirm the parameters used when the job executes. For example, you can use the SJ line command in SDSF to display the job stream,

Display Filter View Print Options Search Help
------------------------------------------------------------------------------

SDSF STATUS DISPLAY ALL CLASSES                 LINE 1-5 (5)
COMMAND INPUT ===>____________________________________ SCROLL ===> CSR
PREFIX=USER015* DEST=(ALL) OWNER=* SORT=Pos/D SYSNAME=
NP JOBNAME  JobID   Prty Queue C Pos Max-RC   Owner SAff ASys
sj USER015A J0553728 1   PRINT A 3908 CC 0000 SERT
__ USER015A J0551219 1   PRINT A 1514 CC 0000 SERT
__ USER015A J0551201 1   PRINT A 1503 CC 0000 SERT
__ USER015A J0551062 1   PRINT A 1400 CC 0000 SERT

and page down to the SYSIN input for the job. (This excerpt shows the single step BATSCAN and the SYSIN input data for the job described in "Requesting a Batch Scan".

//BATSCAN EXEC PGM=CMNBSCAN, ***DATASET SCAN
//          PARM='SUBSYS=6,USER=USER015'
//*)IM CMN$$SPR
//SER#PARM DD   DISP=SHR,DSN=CMNTP.SER810.C6.TCPIPORT
//ABNLIGNR DD   DUMMY
//SYSABEND DD   SYSOUT=*
//SYSPRINT DD   SYSOUT=*
//SYSIN DD *
APL=ACTP
LIB=SRS
DPN=YES
LST=NO
REC=0
CAS=YES
DPS=0
DPE=0
MB1=
MB2=
ST1=
AOR=OR
ST2=
**************************** Bottom of Data********

SYSIN data corresponds to the information you supply on the scan utility panels when you request the scan, as follows:

SYSIN Parameter Corresponding Field on Library Scan Utility Panels **Description
APL Application The application you specified on the Library Scan Utility (CMNSCN01) panel or that you selected from the list of applications on the Application Selection List (CMNSCN04) panel. A separate APL parameter is included in the SYSIN input stream for each application that you select. The above example shows that the ACTP, COMM, and GENL applications are included in the scan.
LIB Library Type The library type you specified on the Library Scan Utility (CMNSCN01) panel or that you selected from the list of library types on the Library Type Selection List (CMNSCN05) panel. A separate LIB parameter is included in the SYSIN input stream for each library type that you select. The example above shows that the JCL and PRC library types are included in the scan. The baseline libraries associated with the JCL and PRC library types for each application are scanned.
DPN Scan for dependencies Whether to scan for dependencies (YES or NO).
LST List member names only Whether to list members only (YES or NO).
REC Records to select Number of output records to display in the scan report: n The first n output records. 0 All output records.
CAS Case Sensitive Specifies whether the search for the specified data strings is case sensitive: YES Search for a string exactly as you typed it. NO Find all occurrences of a string, whether in upper, lower, or mixed case.
DPS Displacement From The column in which to begin the search for the specified string.
DPE Displacement To The column in which to end the search for the specified string.
MB1 Components To Scan Begin The name of the beginning member in a range of members to be scanned.
MB2 Components To Scan End The name of the ending member in a range of members to be scanned.
ST1 Data Strings The first string to scan for.
AOR AND/OR AND or OR boolean operator.
ST2 Data strings (second line) The second string to scan for.