Defining Potential Code Anomalies

Defining Potential Code Anomalies


Within the documentation for Enterprise Analyzer it defines the process for adding clipper queries to the Potential Code Anomalies section of the Executive Reports. Unfortunately the documentation is wrong in that it does not give all the parameters that are required to get the clipper query to run correctly.


What is the correct process for defining Potential Code Anomalies?


The way to setup the clipper query in the CodeDefects.xml is as follows:


<DEFECT Id="name"



Caption="display name"

ListName="list name"

Criterion="path of criterion"

Model="Model Type"/>


Model Type is defined as:


The Interactive Analysis model for the source files to be searched, eg, "COBOL".


List of Commonly used Model Types


COBOL - Cobol source files

JAVAFILE - Java source files

JCL - JCL source files

NATURAL - NATURAL source files

PLI - PL/I source files

RPG - RPG AST Hypercode Model source files

VBP - Visual Basic Project files


Points to Note:

  • To get the Code Anomalies to appear on the report, not only does the Codedefect entry need to be enabled, but the Project Option, Executive Report, Code Defects needs to be selected.
  • Not all possible model types are listed above. Only the common model types have been listed that clipper queries can be run against. Some model types like PL/SQL files do not have level 2 support, so cannot have clipper queries run against them. For more information on this refer to the on-line help system chapter Supported Features by Language.
  • For some languages there are no pre-defined clipper queries, so they have not been listed. Examples are C and C++.


Example of different defect entries


<DEFECT Criterion="General:Coding Standards\MOVE Statements\Possible Sign Loss" ListName="Possible Sign Loss" Caption="Possible Sign Loss" Group="Cobol Coding Standards" Enabled="True" Internal="False" Id="Sign" Model="COBOL"/>


<DEFECT Criterion="General:Coding Standards\Unaligned Assignments" ListName="Unaligned Assignment" Caption="Unaligned Assignment" Group="Pli Coding Standards" Enabled="True" Internal="False" Id="Unaligned" Model="PLI"/>


<DEFECT Criterion="General:Java Best Practices\Basic\Empty If Statements" ListName="Empty If Stats" Caption="Empty If Statements" Group="Java Results" Enabled="True" Internal="False" Id="EmpIfStnts" Model="JAVAFILE"/>


Incident - 2656393


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2014-06-18 09:54
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.