Learning process


Two processes are used to populate the repository with information about COBOL and PL/I programs: first the collection process and then the automated learning process.

Collections collect most entities from COBOL and PL/I programs, such as subprogram calls and I/O, however, they do not collect data items and virtual columns, or the data flow between these entities. That's where the learning process comes in.

After a collection is run and the programs have been downloaded, the learning process further analyzes the programs to gather the data items and their flow. It then adds this information to the repository to complete the picture of the entities contained in the program. This allows you to use all Metadata Analyzer functionality (such as impact analysis and structure charting) with these entities. The learning process also attempts to resolve dynamically called subprograms. If it can find which value moved into the dynamic program name, it will create a program and create a uses relationship from the first program to the called program. If a dynamic program name cannot be resolved, a warning message appears in the Learner log indicating that the dynamic program name could not be resolved.

Note

The way data flow is handled when resolving dynamic program names is customizable using the learnDynamicResolveMaxLevel and learnDynamicResolveAlias parameters.

Note

Only COBOL and PL/I programs can be learned.

Note

Only COBOL and PL/I programs can be learned.

Note

For learning to perform properly, Compuware recommends that you set your virtual memory settings for the paging file to the Microsoft recommended settings for system managed page files.

Learn status

To indicate the progress of learning, collected COBOL and PL/I programs have one of the following statuses:

  • Pending – Waiting to be learned
  • Not learnable – Cannot be learned (programs are only learnable if they have been successfully downloaded)
  • Complete – Successfully finished being learned.
  • Failed – Had condition(s) that prevented the learning process from completing. Programs with a learn status of Failed can be relearned.

If a collection is run while programs are in Pending status, those programs will wait to be learned until no collections are active.

Note

Assembler programs have a status of Not Learnable. Programs that have no Source Library property (such as those collected by a JCL or CICS collection) have no learned status.

This status is displayed in the Properties view. The example below shows the learn status for the program CWXTCOB is Complete.

LEARNstatusWcallouts.jpg

Note

Refer to the Program Analyzer help for information on the Halstead Maintenance Effort property, which is a measure of the effort required to maintain the program.

Determining the learn status

The Metadata Analyzer provides several ways for you to determine whether specific programs have been learned:

  • Search on a specific program
  • Search using favorites
  • Search on learn status
  • Look at the Learner log
Search on a specific program

Use the Search dialog box to locate the program, select the program in the Entities view, then view its Learn Status in the Properties view.

Search using favorites

The Metadata Analyzer comes with two favorite searches to help you quickly and easily identify the programs that have a status of Pending or Failed. In addition, you can add favorites to list programs that have a status of Not Learnable, Started, or Complete by performing these searches and then adding them to your Favorites menu.

Search on learn status

Use the appropriate learn status syntax in the Search dialog box to determine the programs that have the status you want to search for.

Look at the Learner log

The Metadata Analyzer generates a cumulative learner log that contains information about the state of the learning process. Browse this log to determine the status of the learning process and to view the results of programs that have been processed by the learner.

Learning failure

If a program has a Learn status of Failed, the conditions leading to the failure must be resolved so the program will be learned when the collection is rerun. There are several methods for determining why a program failed learning:

  • Look at the diagnostics messages in the Learner log.
  • Reanalyze the program using the Program Analyzer.
  • Create a Portfolio Metrics Report.

Look at the diagnostics messages in the Learner log

A diagnostic message is added to the Learner log for each E-level or S-level error within a program that causes learning to fail.

image2021-3-3_22-43-49.png

Each message includes:

  • The error number, such as E016, and the error text, such as Unable to open COPY member xxxx (for the meaning of the message, click E-level messages or S-level messages)
  • The source line, file line, and column in the program where the error occurred

Reanalyze the program using the Program Analyzer

  1. In the Learner log, find the entity ID of the program that failed learning.

    image2021-3-3_22-43-7.png
  2. In the Metadata Analyzer's Search dialog box, search for the entity ID of the program that failed learning.

    searchForFailedPgm.jpg
  3. From the Entities view, select the entity found by the search.

    searchFORentityID.jpg
  4. From the Tools menu, select Program Analyzer. The program opens in the Program Analyzer.
  5. Refer to the Diagnostics view to quickly find errors and flaws and correct them. The most common errors include missing include (copybook) libraries and other E-level diagnostics.

    PAfailedPGM.jpg
  6. To relearn the program, from the Tools menu, select Relearn. The learn status is changed to Pending and the program is queued for learning.

Create a Portfolio Metrics Report

The Portfolio Metrics Report is particularly helpful when a lot of programs have failed learning because it can give you a report of all of the Procedure-Level Metrics, Program-Level Metrics, and Diagnostic information for multiple programs at one time.

  1. Create a Portfolio Metrics Report by specifying in the Portfolio Metrics Reports – Program Directories dialog box your download directory as the directory that contains the programs you want included in the portfolio metrics report.
  2. In the Portfolio Metrics Reports – Program Directories dialog box, select Diagnostics.
  3. View the Code column of the Diagnostics report for E-level errors. These indicate the programs that failed and why.

To enable and disable the learning process

Because the learning process can add overhead to the server and therefore slow the response time for end users, the admin can control when the learning process runs by enabling or disabling the learning process from the Metadata Analyzer window.

  1. From the Tools menu, select Manage Learning. The Manage Learning dialog box appears. This dialog box indicates:
    • Whether the learning process is currently enabled or disabled
    • The number of programs that are waiting to be learned
    • The average learn time to learn these programs (which displays N/A if nothing has been learned by this instance of the Metadata Server)
      image2021-3-2_12-36-35.png

      Note

      This menu option does not appear on the Tools menu of Guests.

  2. Do one of the following:
    • To enable the learning process, click Enable.
    • To disable the learning process, click Disable. The learning process will not start until the you return to this dialog box and click Enable. If the learning process has already started when Disable is clicked, it will stop at the next logical breakpoint.
  3. Click OK. The state of the learning process is saved in the server.cfg file and is used whenever the Metadata Server is started.

    image2021-3-2_12-38-18.png

    The Learner log contains Informational messages indicating the learning state when the Metadata Server started and any changes to the state that occur while the Metadata Server is running.
    image2021-3-2_12-38-47.png

To move a program to the top of the learning queue

If you need a program to be learned sooner so you can have a complete picture of the entities contained in the program and use all Metadata Analyzer functionality (such as impact analysis and structure charting) with these entities, you can request that the program be moved to the top of the learning queue.

  1. In the Entities view, select the program you want to learn next.
  2. From the Tools menu or by right-clicking the program, select Learn Next. A message indicates that the program has been queued to be learned next or, if another program is scheduled to be learned next, a message gives you the option to move this program to that place in the learning queue. The selected program will be learned immediately after the program currently being learned completes. A message indicating that the program has been moved to the top of the learning queue is added to the learner log.

Note

Make sure that the learning process is enabled before requesting that a program be learned next.







 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*