Scanning source code

About this task

You can take an inventory of the following types of non-binary source:

  • COBOL
  • PL/I
  • Assembler
  • JCL
  • DBD
  • PSB
  • BMS

On z/OS® this source can reside in a variety of containers:

  • As files in PDS/PDSE libraries
  • As source in SCM containers, such as IBM® SCLM.  
Limitations:
  • Rational® Asset Analyzer cannot identify COBOL or PL/I programs that are imbedded in archive files (for example, .zip or .jar files) on Windows systems.
  • Rational Asset Analyzer, when running on z/OS, cannot identify COBOL or PL/I programs on remote Windows systems.

Any file with an unsupported language type is marked with a type of UNK.

During the inventory process, Rational Asset Analyzer performs three tasks, as follows:

  • Identification: It scans the assets in the containers that you specify and identifies what assets are there. 
  • Classification: It classifies what the files are. Thus it determines the language type, line counts, and other characteristics. This phase of inventory also determines whether the files are main files: that is, whether they reference other source (for example, with COPY or INCLUDE statements), contain DLI calls or preprocessor statements (such as EXEC CICS®, EXEC SQL, or EXEC DLI), or contain calls to WebSphere® MQ APIs.

    This initial inventory looks only at the files in the container that you specify, and not at any files that those files reference. However, the phase does store the names of included copy files.

    If the source contains unsupported code as described in Interpreting the results of inventory, then Rational Asset Analyzer does not classify the file and marks the file with a type of UNK.

  • Analysis: It determines what the members contain. This phase involves main files and the source that they reference. This phase extracts details about data declarations, statements, calls, entry points, files, databases, data stores, and literals.

Scanning source code consists of some or all of the following tasks. Although the source code that is operated upon is on the host, you perform the following tasks from the browser interface.

Procedure

Tip:
  • You might be able to bypass steps 2 and 3 if you do not want to change the automatically generated settings and if there are no errors.
  • First take an inventory of containers of included source (COBOL copybooks, JCL PROCs, assembler macros, and so forth) before you take an inventory of containers of programs and batch jobs. Rational Asset Analyzer finds included source based on the information already stored in the database.
  • (Rational Asset Analyzer for System z® only) Your administrator configured Rational Asset Analyzer for System z to use either the Rational Asset Analyzer scanners or the Enterprise compilers to scan COBOL and PL/I source code. Scanning limitations might be different and certain language constructs might be treated differently depending on these choices. Check with your administrator if this choice is pertinent to your source scanning.

  1. Preparing to take inventory Create a job card in the browser interface for source scans.
  2. Setting COBOL and PL/I scanning options Choose the scanners to use for COBOL and PL/I assets and set options for these scanners.
  3. Taking an inventory from PDS and SCM containers You can submit items for initial inventory in any order.
  4. Modifying inventory settings
  5. Start postprocessor