Identifying Interfaces for Generic API Analysis

Use the Generic API Analysis feature if your legacy program calls an unsupported API to interface with a database manager, transaction manager, or similar external facility. In this call, for example:

CALL 'XREAD' using X

where X refers to a table name, the call to XREAD is of less interest than its parameter, the table the called program reads from. But because the parser does not recognize XREAD, only the call is modeled in the EA repository.

You enable the Generic API Analysis feature by identifying unsupported APIs and their parameters in the \<EA Home>\Data\Legacy.xml file. In addition, before you verify your application perform the following steps:

  1. Click Options > Project Options.

    This opens the Options - Project properties dialog box.

  2. Click Verification tab.
  3. In the Source Type list, click COBOL File or PL/I File.
  4. Click Advanced.

    This opens the Details dialog box.

  5. Check Perform Generic API Analysis.
  6. Click OK.

The Perform Generic API Analysis option tells the parser to define relationships with the objects passed as parameters in the calls, in addition to relationships with the unsupported APIs themselves.

This section shows you how to identify the programs and parameters to the parser before verifying your application. You can specify both object and construct model information, and create different relationships or entities for the same parameter in a call.
Attention: The specification requires a thorough understanding of the Enterprise Analyzer repository models. See How Enterprise Analyzer Models Applications, Understanding the Application-Level Metamodel, and Using the Model Reference Pane for more information.
Note: Only the predefined definitions described in this section are guaranteed to provide consistent data to EA databases.

For modified Legacy.xml files, the Legacy.xml file that resides in the \<EA Home>\Data directory gets overwritten when a new HotFix is installed. To preserve the changes made to the file:

  1. Create an empty file Legacy.xml in the workspace directory. You can use the \<EA Home>\Data\Legacy.xml.user file as a template.
  2. Add only the tags that need to be added or altered.
  3. Save the file and verify the sources.

Micro Focus strongly recommends that you do not copy the \<EA Home>\Data\Legacy.xml file to the workspace to modify it, as the altered file is merged with the original file every time the parsers are required to read them. The following is an example of a user-defined Legacy.xml file:

<Legacy>    
   <Cobol>    
    <OverloadedDiagnostics>  
      <msg num="2054" sev="2"/>  
    </OverloadedDiagnostics>  
   </Cobol>    
</Legacy>