RPG Support Guide

Previous Next

RPG Support Guide
RPG Support Guide
This guide describes Modernization Workbench (MW) support for the RPG programming language (ILE RPG, Version 5 Release 3). It includes a summary of supported tools, support notes and known limitations, and reference tables that describe the RPG object (Level 1) and construct (Level 2) models created by the MW parser.
The following topics are discussed:
Supported Tools
Support Notes
Modeling Support in MW
Previous Next

© Copyright 2010 Micro Focus (IP) Limited. All Rights Reserved.


Supported Tools

RPG Support Guide : Supported Tools
Supported Tools
Table 1‑1 describes the Repository-level tools and HyperView panes which are supported for RPG. For details about a specific MW tool, see the workbench documentation set.
Table 1‑1
Supported MW Functionality
Area of MW Supported
Support Notes
Inventory
full support
Verification
full support
Inventory Report
full support
Verification Report
full support
Reference Reports
Unreferred Report
Unresolved Report
Cross-Reference
Executive Report
full support
Complexity Metrics
full support
Effort Estimation
full support
Diagrammer
full support
Quick Diagrammer
full support
Decision Resolution
full support
Hyperview Source Pane
full support
Hyperview Context Pane
full support
Hyperview Clipper Pane
full support
Hyperview Advanced Search
full support
Hyperview Data View Pane
full support
Hyperview Data Flow Pane
full support
Hyperview Component Maker
Dead Code Elimination
Structure-Based (Includes Procedure and Subroutine Slicing)
Hyperview Impact Pane
full support
Hyperview Impact Report Pane
full support
Hyperview RPG Call Diagram Pane
full support
Hyperview Glossary Pane
full support
Hyperview Model Pane
full support
Hyperview Bird's Eye Pane
full support
Business Rule Manager
full support


Support Notes

RPG Support Guide : Support Notes
Support Notes
This section contains general support information and known limitations for RPG in this release.
Note:
Be sure to check the workbench release notes for late-breaking issues not available at press time.


Free Format RPG

RPG Support Guide : Support Notes : Free Format RPG
Free Format RPG
Free Format RPG is supported.


Generating Copybooks

RPG Support Guide : Support Notes : Generating Copybooks
Generating Copybooks
RPG programs often use copy statements that reference Database Description or Device Description files rather than copybooks. If your application uses copy statements to reference these types of files, you need to verify the files and generate copybooks for the application before you verify program files.
Copybook generation takes place in two steps:
•
For each database and device file object generated at verification, the system creates a target copybook object.
•
For each target copybook object, the system creates one or more physical copybooks.
Options let you combine the steps or perform them separately.
To generate copybooks for RPG programs:
1
Verify Database Description and Device Description files.
•
For each Database Description file, the system creates a database file object with the same name as the Database Description file.
•
For each Device Description file, the system creates a device file object with the same name as the Device Description file.
2
Before converting target copybooks to physical copybooks, set project options that control conversion behavior. In the Repository Browser, select the project and choose Project Options in the Tools menu. The Project Options window opens. Click the Generate Copybooks tab.
In the Generate Copybooks tab:
•
Place a check mark next to Convert Target Copybooks to Legacy Objects if you want to generate target copybooks and convert them to physical copybooks in the same step (see step 3).
•
In the Target Copybooks Conversion pane, select Assign Converted Files to the Current Project if you want the system to create physical copybooks in the current project.
•
In the Conversion Conflicts pane, choose:
•
Keep Old Legacy Objects if you want the system not to overwrite existing physical copybooks.
•
Replace Old Legacy Objects if you want the system to overwrite existing physical copybooks.
•
Select Remove Target Copybooks After Successful Conversion if you want the system to remove target copybooks from
the current project after physical copybooks are generated.
3
In the Repository Browser, select the project and choose Generate RPG Copybooks for Project in the Prepare.
The system creates a target copybook object for each database and device file object, with a name of the form database file.DBCOPYBOOK or device file.DVCOPYBOOK, in the Target Copybooks folder.
If you selected the Convert Target Copybooks to Legacy Objects option in step 2, the system converts the target copybooks to physical copybooks, with names of the form DD_OF_database file.CPY or DV_OF_device file.CPY.
Note:
To generate copybooks for given database or device file objects, select the objects and choose Generate Copybooks or Generate RPG Copybooks, as appropriate, in the Prepare menu.
Keep in mind that when you generate copybooks for an entire project, the system processes objects in the appropriate order, taking account of the dependencies between them. That is not the case when you generate copybooks for given objects.
Copybooks for database file objects must be generated before copybooks for device file objects. Copybooks for referenced objects must be generated before copybooks for referencing objects.
If you did not select the Convert Target Copybooks to Legacy Objects option in step 2, select the target copybooks in the Repository Browser and choose Convert to Legacy in the Prepare menu. The system converts the target copybooks to physical copybooks, with names of the form DD_OF_database file.CPY or DV_OF_device file.CPY.


Modeling Support in MW

RPG Support Guide : Modeling Support in MW
Modeling Support in MW
MW is a model-based technology that generates information about legacy applications at two levels:
•
Level 1 (or object-level) information describes the relationships between the objects that comprise an application: program source files, header files, and so forth.
•
Level 2 (or construct-level) information describes the relationships between the abstract syntactical constructs that comprise an object: sections, paragraphs, statements, conditions, variables, and so forth.
At both levels, the models are conceived as Entity Relationship Diagrams (ERDs). Each object or construct the parser generates is modeled as an entity in one of the diagrams. The models are represented in tree form to the end user.


Level 1 Modeling Support for RPG

RPG Support Guide : Modeling Support in MW : Level 1 Modeling Support for RPG
Level 1 Modeling Support for RPG
The Level 1 model for an application defines the relationships between the objects that comprise the application. These can be physical objects, like RPG files, database files, or device files, or logical objects that identify abstract program elements (database descriptions, device descriptions, jobs, and the like).


Level 1 Metamodel

RPG Support Guide : Modeling Support in MW : Level 1 Modeling Support for RPG : Level 1 Metamodel
Level 1 Metamodel
Every entity the parser generates is an instance of an entity type. The Level 1 metamodel defines these types, or meta-entities, and their relationships. Figure 1‑1 shows the Level 1 metamodel.
Note:
The Level 1 metamodel is also referred to, in OMG terms, as the Knowledge Discovery Metamodel (KDM).
Figure 1‑1
Level 1 Metamodel
Click image to expand


Level 1 Model Table

RPG Support Guide : Modeling Support in MW : Level 1 Modeling Support for RPG : Level 1 Model Table
Level 1 Model Table
Table 1‑2 shows the objects in the Level 1 metamodel and their relationships.
Table 1‑2
Level 1 Model Table
Object
Relationships
Control Language File
Defines Job
Database Description
Defines Database File
Includes Database Description
Database File
Generates Target Copybook
Represents Database File
Shares Format From Database File
Uses Format From Database File
Device Description
Defines Device File
Includes Database Description
Device File
Generates Target Copybook
Has Screen
Job
Creates Data Area
Deletes Data Area
Has Data Connector
Has Program Entry Point
Reads Data Area
Refers To Data Store
Refers To Data Store Decision
Refers To Data Store thru Decision
Runs Job
Runs Job thru Decision
Runs Program
Runs Program Entry Decision
Runs Program Entry Point
Runs Program thru Decision
Runs System Program
Runs Thru Decision
Transfers To Program Entry Decision
Updates Data Area
Uses Data Store
Program
Calls Job
Calls Program
Calls Program Entry Decision
Calls Program Entry Point
Calls Program thru Decision
Calls thru Decision
Deletes from Data Store
Deletes from Data Store thru Decision
Deletes from File
Deletes from File Decision
Deletes from File thru Decision
Inserts into Data Store
Inserts Into File
Inserts Into File Decision
Inserts into File thru Decision
Reads Data Store
Reads Data Store thru Decision
Reads File
Reads File Decision
Reads File thru Decision
Receives Screen
Receives Screen Decision
Receives Screen thru Decision
Sends Screen
Sends Screen Decision
Sends Screen thru Decision
Updates Data Store
Updates Data Store thru Decision
Updates File
Updates File thru Decision
RPG Copy
Includes RPG Copy
Is Included in RPG Copy
Is Included in RPG File
RPG File
Defines Program
Includes RPG Copy


Level 1 Relationship Projections

RPG Support Guide : Modeling Support in MW : Level 1 Modeling Support for RPG : Level 1 Relationship Projections
Level 1 Relationship Projections
Table 1‑3 describes relationships generated by RPG statements in the Level 1 model.
Table 1‑3
Level 1 Relationship Projections
Statement
Format
Relationships
Entities
COPY
INCLUDE
/COPY member
/COPY library/filename,member
/INCLUDE [library/filename,]member
RPG File
Includes RPG Copy
RPG Copy
for resolved files:
RPG Copy.Name = <resolved-name>
for unresolved files:
RPG Copy.Name = [<library>.<filename>.]<member>
Main procedure
RPG File
Defines Program
Program
Program.Name=<source-name>
Program
Has Program Entry Point
Program Entry Point
Program Entry Point.Name=<source-name>
Program Entry Point.Main Entry Flag=true
Procedure specification
P name B EXPORT
Program
Has Program Entry Point
Program Entry Point
Program Entry Point.Name=<name>
CALL
CALL ‘name’
Program
Calls Program Entry Point
Program Entry Point
Program Entry Point.Name=<name>
CALL varname
Program
Calls Program Entry Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.Calls.<varname>
Type=PROGRAMENTRY
…
CALLB
CALLB ‘name’ …
Program
Calls Bound Procedure
Program Entry Point
Program Entry Point.Name=<name>
CALLB procptr
Program
Calls Bound Procedure Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.CallsPrc.<procptr>
Type=PROGRAMENTRY
…
CALLP
D name PR EXTPGM(‘ename’)
C CALLP name
Program
Calls Program Entry Point
Program Entry Point
Program Entry Point.Name=<ename>
D name PR EXTPGM(varname)
C CALLP name
Program
Calls Program Entry Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.Calls.<varname>
Type=PROGRAMENTRY
…
D name PR EXTPROC(‘ename’)
C CALLP name 1)
Program
Calls Bound Procedure
Program Entry Point
Program Entry Point.Name=<ename>
D name PR EXTPROC(procptr)
C CALLP name
Program
Calls Bound Procedure Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.CallsPrc.<procptr>
Type=PROGRAMENTRY
…
D name PR
C CALLP name 2)
Program
Calls Bound Procedure
Program Entry Point
Program Entry Point.Name=<name>
File description
Static file descriptions:
F file-name
external-file-name=<file-name>
F file-name
EXTFILE(‘ExtFileName’)
external-file-name=<ExtFileName>
F file-name
EXTMBR(‘ExtMbrName’)
external-file-name=<ExtMbrName>
F file-name
EXTFILE(‘ExtFileName’)
EXTMBR(‘ExtMbrName’)
external-file-name=
<ExtFileName>.<ExtMbrName>
Dynamic file descriptions:
F file-name EXTFILE(varname)
decision-var=<varname>
F file-name
EXTMBR(varname)
decision-var=<varname>
F file-name EXTFILE(varname)
EXTMBR(varname2)
decision-var=<varname>
F file-name EXTFILE(varname)
EXTMBR(‘ExtMbrName’)
decision-var=<varname>
CHAIN
F file-name (static-file-description) 3)
C CHAIN record-name
Program
Reads File
File
File.Name=<program-name>.<file-name>
File.File Type=FILE
File.DD Name=<file-name>
File
Assigned To Data Store
Data Store
Data Store.Name=<external-file-name>
Data Store.DSNAME=<external-file-name>
F file-name (dynamic-file-description) 3)
C CHAIN record-name
Program
Reads File Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.ReadsDataPort.<decision-var>
Type=DATAPORT
…
DELETE
F file-name (static-file-description) 3)
C DELETE record-name
Program
Deletes From File
File
File.Name=<program-name>.<file-name>
File.File Type=FILE
File.DD Name=<file-name>
File
Assigned To Data Store
Data Store
Data Store.Name=<external-file-name>
Data Store.DSNAME=<external-file-name>
F file-name (dynamic-file-description) 3)
C DELETE record-name
Program
Deletes From File Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.DeletesDataPort.<decision-var>
Type=DATAPORT
…
EXFMT
F file-name WORKSTN (static-file-description) 3)
C EXFMT record-name
Program Sends/Receives Screen
Screen
Screen.Name=
<external-file-name>.<record-name>
F file-name WORKSTN (dynamic-file-description) 3)
C EXFMT record-name
Program
Sends/Receives Screen Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.SendsReceives.<decision-var>
Type=MAP
…
READ,
READE,
READP, READPE,
F file-name (static-file-description) 3)
C READ record-name
Program
Reads File
File
File.Name=<program-name>.<file-name>
File.File Type=FILE
File.DD Name=<file-name>
File
Assigned To Data Store
Data Store
Data Store.Name=<external-file-name>
Data Store.DSNAME=<external-file-name>
F file-name (dynamic-file-description) 3)
C READ record-name
Program
Reads File Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.ReadsDataPort.<decision-var>
Type=DATAPORT
…
READ,
READE,
READC,
READP, READPE
F file-name WORKSTN (static-file-description) 3)
C READ record-name
Program
Receives Screen
Screen
Screen.Name=
<external-file-name>.<record-name>
F file-name WORKSTN (dynamic-file-description) 3)
C READ record-name
Program
Receives Screen Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.Receives.<decision-var>
Type=MAP
…
WRITE
F file-name (static-file-description) 3)
C WRITE record-name
Program
Inserts Into File
File
File.Name=<program-name>.<file-name>
File.File Type=FILE
File.DD Name=<file-name>
File
Assigned To Data Store
Data Store
Data Store.Name=<external-file-name>
Data Store.DSNAME=<external-file-name>
F file-name (dynamic-file-description) 3)
C WRITE record-name
Program
Inserts Into File Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.InsertsDataPort.<decision-var>
Type=DATAPORT
…
WRITE
F file-name WORKSTN (static-file-description) 3)
C WRITE record-name
Program
Sends Screen
Screen
Screen.Name=
<external-file-name>.<record-name>
F file-name WORKSTN (dynamic-file-description) 3)
C WRITE record-name
Program
Sends Screen Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.Sends.<decision-var>
Type=MAP
…
UPDATE
F file-name (static-file-description) 3)
C UPDATE record-name
Program
Updates File
File
File.Name=<program-name>.<file-name>
File.File Type=FILE
File.DD Name=<file-name>
File
Assigned To Data Store
Data Store
Data Store.Name=<external-file-name>
Data Store.DSNAME=<external-file-name>
F file-name (dynamic-file-description) 3)
C UPDATE record-name
Program
Updates File Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.UpdatesDataPort.<decision-var>
Type=DATAPORT
…
UPDATE
F file-name WORKSTN (static-file-description) 3)
C UPDATE record-name
Program
Sends Screen
Screen
Screen.Name=
<external-file-name>.<record-name>
F file-name WORKSTN (dynamic-file-description) 3)
C UPDATE record-name
Program
Sends Screen Decision
Decision
Decision:
Name=<program-name>.<internal-name>
AKA=<program-name>.Sends.<decision-var>
Type=MAP
…


Complexity Metrics

RPG Support Guide : Modeling Support in MW : Level 1 Modeling Support for RPG : Complexity Metrics
Complexity Metrics
Table 1‑4 describes the industry standard and workbench-generated complexity metrics supported by the legacy estimation tools. Not all metrics will be available for your configuration.
Table 1‑5 describes RPG-specific details for the supported complexity metrics.
Table 1‑4
Complexity Metrics
Metric
Object Types
Description
Absolute Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Binary Decisions divided by the number of statements.
Abstract Classes
Java Package, Java File
Number of abstract classes and interfaces.
Abstract Methods
Java Package, Java File
Number of abstract methods.
Abstractness
Java Package
Ratio of Number of Abstract Classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package.
Afferent Coupling
Java Package
Number of other packages that depend on classes in the package. An indicator of the package’s responsibility.
Areas
DMS DDL File, IDMS Schema File, IDMS Subschema
Number of areas.
Asynchronous Calls
Program
Number of asynchronous calls, such as Cobol INITIATE statements.
Average Absolute Complexity
Java Class, Java Interface, Java Package, Java File
Average Absolute Complexity of methods.
Average Binary Decisions
Java Class, Java Interface, Java Package, Java File
Average Binary Decisions of methods.
Average Catch Clauses
Java Class, Java Interface, Java Package, Java File
Average Catch Clauses in methods.
Average Computational Statements
Java Class, Java Interface, Java Package, Java File
Average Computational Statements of methods.
Average Conditional Complexity
Java Class, Java Interface, Java Package, Java File
Average Conditional Complexity of methods.
Average Cyclomatic Complexity
Java Class, Java Interface, Java Package, Java File, PB Object
Average Cyclomatic Complexity of methods.
Average Depth of Inheritance Hierarchy
Java Package, Java File
Average Depth of Inheritance Hierarchy of classes and interfaces.
Average Essential Complexity
Java Class, Java Interface, Java Package, Java File
Average Essential Complexity of methods.
Average Extended Cyclomatic Complexity
Java Class, Java Interface, Java Package, Java File
Average Extended Cyclomatic Complexity of methods.
Average IF Statements
Java Class, Java Interface, Java Package, Java File
Average IF Statements in methods.
Average Lack of Cohesion Per Type
Java Package, Java File
Average Lack of Cohesion of classes and interfaces.
Average Loop Statements
Java Class, Java Interface, Java Package, Java File
Average Loop Statements in methods.
Average Maximum Switch Cases
Java Class, Java Interface, Java Package, Java File
Average Maximum Switch Cases in methods.
Average Nested Block Depth
Java Class, Java Interface, Java Package, Java File, PB Object
Average Nested Block Depth of methods.
Average Parameters
Java Class, Java Interface, Java Package, Java File, PB Object
Average Parameters in methods.
Average Specialization Index Per Type
Java Package, Java File
Average Specialization Index of classes and interfaces.
Average Subtypes
Java Package
Average Subtypes in methods.
Average Switch Cases
Java Class, Java Interface, Java Package, Java File
Average Switch Cases in methods.
Average Switch Statements
Java Class, Java Interface, Java Package, Java File
Average Switch Statements in methods.
Average Unique Method Calls
Java Class, Java Interface, Java Package, Java File
Average Unique Method Calls in methods.
Binary Decisions
Java Method, PB Method, Program, VB Function, VB Method,
C/C++ Function, C++ Member Function
Number of branching conditions in the flow graph with two possible outcomes. Includes statements with implicit condition evaluation (loops, AT END, and so on).
Blank Lines
All source files
Number of blank lines of source (sequence number area content is ignored).
Catch Clauses
Java Method, PB Method
Number of catch clauses.
Classes
VB Library
Number of classes.
Columns
DDL File
Number of columns.
Comment Lines
PL/I File, PL/I Include File
Number of lines of source containing comments only and no code.
Comments Ratio
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, PB Method, PB Object
Number of Comments divided by Lines of Code.
Computational Statements
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Number of statements performing arithmetic calculations.
Conditional Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Binary Decisions plus Unique Operands in Conditions.
Conditional Statements
Program
Number of branching statements with nested statements executed under certain conditions, not including conditional GOTOs.
Constructors
C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, PB Method, PB Object
Number of constructors.
Control Cards Usages
JCL File, JCL Procedure
Number of DD statements referencing control cards identified in Legacy.xml to generate program to control card relationships.
Cyclomatic Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
v(G) = e - n + 2, where v(G) is the cyclomatic complexity of the flow graph (G) for the program in question, e is the number of edges in G, and n is the number of nodes. Quantity of decision logic. The number of linearly independent paths (minimum number of paths to be tested). v(G) = DE + 1, where DE is the number of binary decisions made in the program.
Data Elements
Copybook File, Program
Number of declared data items (elementary structures and their fields). For PL/I, the implicit variable DFHEIBLK for CICS statements is counted as a data element.
Data Members
C++ Class
Number of data members.
Data Sets
DMSII Database
Number of data sets.
Dead Data Elements
Program
Number of dead data elements in programs and used include files. Dead data elements are unused structures at any data level, all of whose parents and children are unused. For PL/I, number of declared data items in dead internal procedures.
Dead Data Elements from Includes
Program
Number of dead data elements in include files. Dead data elements are unused structures at any data level, all of whose parents and children are unused. For PL/I, N/A.
Dead Lines
Program
Number of dead lines in programs and used include files. Dead lines are source lines containing Dead Data Elements or Dead Statements. For Cobol, also source lines containing “dead constructs.” For more information on dead constructs, see the Parser Reference Manual.
Dead Lines from Includes
Program
Number of dead lines in include files. Dead lines are source lines containing Dead Data Elements from Includes or Dead Statements from Includes. For Cobol, also source lines containing “dead constructs.” For more information on dead constructs, see the Parser Reference Manual.
Dead Statements
Program
Number of dead statements in programs and used include files. A dead statement is a procedural statement that can never be reached during program execution. For PL/I, dead DECLARE statements are not calculated as dead statements.
Dead Statements from Includes
Program
Number of dead statements in include files. A dead statement is a procedural statement that can never be reached during program execution.
Depth of Inheritance Hierarchy
C++ Class, Java Class, Java Interface, PB Object
Maximum nesting of the inheritance hierarchy.
Destructors
C++ Class, VB Class
Number of destructors.
Difficulty
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
D = (n1 / 2) * (N2 / n2), where n1 is Unique Operators, N2 is Operands, and n2 is Unique Operands.
Disjoint Data Sets
DMSII Database
Number of disjoint data sets.
Efferent Coupling
Java Package
Number of other packages that the classes in the package depend on. An indicator of the package’s independence.
Entry Points
Program
Number of program entry points.
Error Estimate
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
B = E**(2/3) / 3000, where E is Programming Effort.
Essential Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program
Quantity of unstructured logic (a loop with an exiting GOTO statement, for example). v(G) for reduced graph without D-structured primes.
Exception Handling Statements
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of exception handling statements.
EXEC Cataloged Procedure Steps
JCL File, JCL Procedure
Number of EXEC statements invoking cataloged procedures.
EXEC In-stream Procedure Steps
JCL File, JCL Procedure
Number of EXEC statements invoking instream procedures.
Executable Statements
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
All Cobol Procedure Division statements, plus CONTINUE and NEXT STATEMENT. All PL/I statements, except BEGIN, DECLARE, DO (block), END, ENTRY, PACKAGE, and PROCEDURE. All Natural statements, except DEFINE DATA and IGNORE. For object-oriented languages, all assignments, function calls (alone on a line), calls, returns, IF, DO, FOR, CHOOSE, EXIT, CONTINUE, and GOTO statements.
Extended Cyclomatic Complexity
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Cyclomatic Complexity plus Logical Operators in Conditions. Number of all paths in the program.
Fields
AS/400 Database File, Java Class, Java Interface, Java Package, Java File, PB Object, VB Class
Number of fields.
Fields of Adabas File Number
Natural DDM File
Number of fields of Adabas file number.
Foreign Keys
DDL File
Number of foreign keys.
Function Calls
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of function calls.
Function Points
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, VB Class, VB Function, VB Method
Lines of Code divided by K, where K depends on the language: Cobol=77, Natural=52, PL/I=67, PowerBuilder=24. For RPG, Lines of Code/K + 0.5, where K=61. Estimate of the number of end-user business functions implemented by the program.
Functions
VB Library
Number of functions.
Global Data Items
DMSII Database
Number of global data items.
GoTo Statements
C/C++ Function, C++ Member Function, Program, VB Function, VB Method
Number of GOTO statements, including conditional GOTOs.
Hidden Fields
Map
Number of hidden fields.
IF Statements
C/C++ Function, C++ Member Function, Java Method, PB Method, VB Function, VB Method
Number of IF statements.
Import Statements
Java Package, Java File
Number of import statements.
Include Copybook Statements
APS File, APS Include File
Number of include copybook statements.
Include Data Structure
APS Application
Number of included data structures.
Include DDI
APS Application
Number of included DDIs.
Include DDL/PSB
APS Application
Number of included data definitions.
Include Global Data Area Statements
Natural File, Natural Subroutine File
Number of included global data area statements.
Include Local Data Area Statements
Natural File, Natural Subroutine File
Number of included local data area statements.
Include Macro Statements
APS File, APS Include File
Number of included macro statements.
Include Macro/Copybook
APS Application
Number of included macros/copybooks.
Include Parameter Data Area Statements
Natural File, Natural Subroutine File
Number of included parameter data area statements.
Include Program
APS Application
Number of included programs.
Include Report
APS Application
Number of included reports.
Include Resource Statement
Copybook File, Cobol File (ACUCOBOL only)
Number of included resource statements.
Include Screen
APS Application
Number of included screens.
Include Statements
All source files, except DDL File, Java Interface, Java File, PB Object
Number of language-specific include statements.
Inherited Methods
C++ Class, VB Class
Number of inherited methods.
Inner Call Statements
Program
Number of statements that invoke Inner Procedures.
Inner Procedures
Program
Number of structured pieces of code that cannot be invoked from external programs (Cobol paragraphs, inner PL/I procedures, Natural inline subroutines).
Input Fields
Map
Number of input fields.
Input/Output Fields
Map
Number of input/output fields.
Instability
Java Package
Ratio of Efferent Coupling (Ce) to total coupling (Ce + Ca), such that I = Ce / (Ce + Ca). An indicator of the package’s resilience to change.
Intelligent Content
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
I = L * V, where L is Program Level and V is Program Volume. Complexity of a given algorithm independent of the language used to express the algorithm.
Interfaces
Java Class, Java Interface, Java Package, Java File
Number of interfaces.
IO Statements
Program
Number of statements performing input/output operations.
Key Fields
AS/400 Database File
Number of key fields.
Labels
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of labels.
Lack of Cohesion
Java Class, Java Interface
LOCM = (m - sum(mA)/a1+a2) / (m-1), where mA is the number of methods that access class attributes.
Lines of Code
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of lines of code, including copybooks (if applicable), but not including comments and blank lines.
Lines with Both Comments and Code
PL/I File, PL/I Include File
Number of lines of source containing both comments and code.
Lines with Comments
All source files, except PL/I, PL/I Include, and Java Files
Number of lines of source containing comments, including inline comments placed on lines with statements.
Local Data Items
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of local data items.
Logical Operators in Conditions
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, VB Class, VB Function, VB Method
Number of binary logical operators used in conditions.
Logical Records
IDMS Subschema File
Number of logical records.
Loop Statements
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Number of repetitively executing statements.
Macro Assignments
PL/I File, PL/I Include File
Number of assignments to global macro variables outside any macro procedure.
Macro Declarations
PL/I File, PL/I Include File
Number of global macro variables. Macro variables within macro procedures are not counted.
Macro Lines
PL/I File, PL/I Include File
Number of lines for include statements, macro invocations, declarations, macro procedures, and %-statements. Blank lines and comments lines are ignored.
Macro Procedures
PL/I File, PL/I Include File
Number of macro procedures declared in the file.
Macro Statements
PL/I File, PL/I Include File
Number of macro statements.
Maintainability Index
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
MI = 171 - 5.2 * ln (PgmVolume) - 0.23 * ExtCycComp - 16.2 * ln (LOC) + 50 * sin (sqrt (2.46 * CommentLines/SourceLines)), where PgmVolume is Program Volume, ExtCycComp is Extended Cyclomatic Complexity, LOC is Lines of Code, CommentLines is Comment Lines, and SourceLines is Source Lines.
Maps
Natural Map
Number of maps.
Maximum Depth of Logic Nesting
C/C++ Function, C++ Member Function
Maximum nesting of logic.
Maximum Switch Cases
C/C++ Function, C++ Member Function, Java Method, PB Method
Maximum Switch Cases.
Member Function Calls
C/C++ Function, C++ Member Function
Number of member function calls.
Member Functions
C++ Class
Number of member functions.
Method Calls
VB Function, VB Method
Number of method calls.
Methods
Java Class, Java Interface, Java Package, Java File, PB Object, VB Class
Number of methods.
Nested Block Depth
Java Method, PB Method
Maximum nesting of IF, CHOOSE, TRY, DO, SWITCH, or FOR constructs. 1 is added to the depth in the IF and ELSE parts of IF statements, the bodies of loops, and the code in each case of a Choose statement.
Nesting Level
Program, VB Function, VB Method
Maximum nesting of conditional statements within conditional statements (0 if no conditional statements, 1 if no nesting).
Non-returning Calls
Program
Number of non-returning calls, such as Cobol XCTL statements.
Normalized Distance
Java Package
Perpendicular distance of the package from the idealized line A + I = 1. An indicator of the package’s balance between abstractness and stability.
Number of Comments
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, PB Method, PB Object
For C/C++, number of items containing text preceded by // or enclosed between /* and */.
For Java, number of lines of source containing comments, including inline comments placed on lines with statements.
For PowerBuilder, number of lines of source containing comments only and no code.
Number of Controls
PB DataWindow
Number of controls.
Number of Entries
CSD File, FCT File, PCT File, Valtab File
Number of entries.
Number of Executes
ECL File
Number of executes.
Number of Lines
PB DataWindow, PB Query, PB Pipeline
Number of lines.
Number of PCBs
PSB File
Number of PCBs.
Number of Processor Calls
ECL File
Number of processor calls.
Omit Fields
AS/400 Database File
Number of Omit fields.
Operands
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of operand occurrences (N2). Operands are variables and literals used in operators. Compare Unique Operands.
Operators
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of operator occurrences (N1). Operators are executable statements and unary and binary operations. Compare Unique Operators.
Output Fields
Map
Number of output fields.
Overridden Methods
Java Class, Java Interface, Java Package, Java File
Number of overridden methods.
Parameters
C/C++ Function, C++ Member Function, Java Method, PB Method, Program, VB Function, VB Method
Number of Cobol Procedure Division USING...RETURNING parameters. Number of PL/I PROCEDURE parameters. Number of Natural PARAMETER and PARAMETER USING parameters. Otherwise, number of parameters in method calls.
Path Groups
IDMS Subschema File
Number of path groups.
Pointers
C/C++ Function, C++ Member Function, C++ Class, Program, VB Function, VB Method
Number of data elements declared as pointers.
Primary Keys
DDL File
Number of primary keys.
Program Length
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
N = N1 + N2, where N1 is Operators and N2 is Operands.
Program Level
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
L = 1 / D, where D is Difficulty.
Program Volume
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
V = N * log2(n), where N is Program Length and n is Vocabulary. Minimum number of bits required to code the program.
Programming Effort
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
E = V / L, where V is Program Volume and L is Program Level. Estimated mental effort required to develop the program.
Programming Time
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
T = E / 18, where E is the Programming Effort and 18 is Stroud’s Number. Estimated amount of time required to implement the algorithm, in seconds.
Public Data Members
C++ Class
Number of public data members.
Public Fields
VB Class
Number of public fields.
Public Member Functions
C++ Class
Number of public member functions.
Public Methods
VB Class
Number of public methods.
Records
ADL File, AS/400 Database File, DMS DDL File, IDMS Schema File, IDMS Subschema File
Number of records.
Remapped Data Sets
DMSII Database
Number of remapped data sets.
Response for Class
C++ Class, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object
Response for class.
Returning Calls
Program
Number of returning calls, such as Cobol CALL or LINK statements.
Screens
AS/400 Device Description, BMS File, DPS File, ICL Form, MFS File
Number of screens.
Segments
DBD File
Number of segments.
SELECT (SWITCH) Statements
VB Method
Number of SWITCH statements.
Select Fields
AS/400 Database File
Number of select fields.
Sets
ADL File, DMS DDL File, DMSII Database, IDMS Schema File, IDMS Subschema File
Number of sets.
Sliceable Dead Lines
PL/I Program
Number of Dead Lines that can be sliced using the Application Architect Dead Code Elimination method. Dead procedures containing either preprocessor statements or statements subject to macro preprocessor replacement are not counted as sliceable dead lines, since it is not always possible to determine whether they can be safely removed. Lines from include files are not counted.
Source Lines
All source files
Number of lines of source.
Specialization Index
Java Class, Java Interface
Number of subclasses divided by number of superclasses.
Static Data Items
C/C++ Function, C++ Member Function, VB Function, VB Method
Number of static data items.
Static Data Members
C++ Class
Number of static data members.
Static Fields
Java Class, Java Interface, Java Package, Java File, PB Object, VB Class
Number of static fields.
Static Functions
C++ Class
Number of static functions.
Static Member Functions
C++ Class
Number of static member functions.
Static Methods
Java Class, Java Interface, Java Package, Java File, VB Class
Number of static methods.
Steps
JCL File, JCL Procedure, Job
Number of steps.
Subsets
DMSII Database
Number of subsets.
Subtypes
Java Class, Java Interface, Java File, PB Object
Number of subtypes.
Switch Cases
C/C++ Function, C++ Member Function, Java Method, PB Method
Number of SWITCH cases.
Switch/Choose Statements
Java Method, PB Method
Number of SWITCH in Java, CHOOSE statements. in PowerBuilders.
SWITCH/SELECT Statements
C/C++ Function, C++ Member Function, VB Function
Number of SWITCH statements.
Tables
DDL File
Number of tables.
Total EXEC Cataloged Procedure Steps
JCL File
Number of EXEC statements invoking cataloged procedures in the job and invoked procedures. If a procedure is invoked multiple times, it is counted each time.
Total Include Copybook Statements
APS File, APS Include
Total number of include copybook statements.
Total Include Statements
Assembler File, BMS File, Cobol File, Copybook File, DMS II DASDL File, ECL File, JCL File, MFS File, Natural File, Natural Subroutine File, PL/I File, PSB File, RPG File, VB Project File, WFL File
Total Include Statements. For PL/I, all the include statements in the file and the used include files.
Unique Function Calls
C/C++ Function, C++ Member Function
Number of unique function calls.
Unique Member Function Calls
C/C++ Function, C++ Member Function
Number of unique member function calls.
Unique Method Calls
Java Method, PB Method, PB Object
Number of distinct method calls.
Unique Operands
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of distinct operands (n2). Operands are variables and literals used in operators. Uniqueness of literals is determined by their notation. Compare Operands.
Unique Operands in Conditions
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of distinct operands used in conditions.
Unique Operators
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
Number of distinct operators (n1). Operators are statements and unary and binary operations. Compare Operators.
Unique System Macro Instructions
Assembler File
Number of unique system macro instructions.
Vocabulary
C/C++ Function, C++ Member Function, C++ Class, Java Method, Java Class, Java Interface, Java Package, Java File, Program, PB Method, PB Object, VB Class, VB Function, VB Method
n = n1 + n2, where n1 is the number of Unique Operators and n2 is the number of Unique Operands.
Weighted Methods
Java Class, Java Interface, Java Package, Java File, PB Object
Number of weighted methods.
Detailed Description of RPG Complexity Metrics
Table 1‑5
Detailed Description of RPG Complexity Metrics
Metric
Statements
Binary Decisions
CABxx, CASxx, DO, DOU, DOUxx, DOW, DOWxx, FOR, IF (# of ELSEIF + 1), IFxx (# of ELSEIF + 1), MONITOR (# of ON-ERROR), SELECT (# of WHEN, WHENxx)
Call Statements
CALL, CALLB in case of external procedure, CALLP in case of external program or procedure
Computational Statements
ADD, ADDDUR, DIV, EVAL, EVALR, MULT, MVR, SQRT, SUB, SUBDUR, XFOOT, Z-ADD, Z-SUB
Conditional Statements
DO, DOU, DOUxx, DOW, DOWxx, FOR, IF, IFxx, MONITOR, SELECT
Data Elements
All data names declared
Entry Points
Main procedure, exported subprocedures
Executable Statements
ACQ, ADD, ADDDUR, ALLOC, BITOF, BITON, CABxx, CALL, CALLB, CALLP, CASxx, CAT, CHAIN, CHECK, CHECKR, CLEAR, CLOSE, COMMIT, COMP, DEALLOC, DELETE, DIV, DO, DOU, DOUxx, DOW, DOWxx, DSPLY, DUMP, EVAL, EVALR, EXCEPT, EXFMT, EXSR, EXTRCT, FEOD, FOR, FORCE, GOTO, IF, IFxx, IN, ITER, LEAVE, LEAVESR, LOOKUP, MHHZO, MHLZO, MLHZO, MLLZO, MONITOR, MOVE, MOVEA, MOVEL, MULT, MVR, NEXT, OCCUR, OPEN, OUT, POST, READ, READC, READE, READP, READPE, REALLOC, REL, RESET, RETURN, ROLBK, SCAN, SELECT, SETGT, SETLL, SETOFF, SETON, SHTDN, SORTA, SQRT, SUB, SUBDUR, SUBST, TEST, TESTB, TESTN, TESTZ, TIME, UNLOCK, UPDATE, WRITE, XFOOT, XLATE, Z-ADD, Z-SUB
GoTo Statements
CABxx, GOTO
Include Statements
/COPY, /INCLUDE, EXEC SQL INCLUDE
Inner Call Statements
CALLB in case of inner procedure, CALLP in case of inner procedure, CASxx, EXSR
Inner Procedures
Not exported subprocedures, subroutines
IO Statements
ACQ, CHAIN, CLOSE, COMMIT, DELETE, EXCEPT, EXFMT, FEOD, FORCE, NEXT, OPEN, POST, READ, READC, READE, READP, REDPE, REL, ROLBK, SETGT, SETLL, UNLOCK, UPDATE, WRITE,
DSPLY
Logical Operators in Conditions
AND, OR, ANDxx, ORxx in conditions of Conditional statements
Loop Statements
DO, DOU, DOUxx, DOW, DOWxx, FOR
Nesting Level
Maximum nesting of Conditional statements
Operands
All references to data items and literals in executable statements
Operators
All Executable statements;
unary operations: +, -, NOT;
binary operations: +, -, *, /, **, =, <>, >, >=, <, <=, AND, OR, ANDxx, ORxx;
built-in function calls;
user-defined function calls;
(subscript);
WHENxx comparison operation;
Parameters
Parameters definition in procedure interface of main procedure;
PARM of *ENTRY PLIST in the main procedure
Pointers
Dataitems with Basing Pointer and Procedure Pointer data types
Unique Operands in Conditions
Unique operands in conditions of Conditional statements and CABxx, CASxx


Level 2 Modeling Support for RPG

RPG Support Guide : Modeling Support in MW : Level 2 Modeling Support for RPG
Level 2 Modeling Support for RPG
The Level 2 model for an object defines its syntax. It shows in abstract form how the syntactical constructs that comprise the object (data ports, procedure calls, expressions, variables, etc. ) are related.


Level 2 Metamodel

RPG Support Guide : Modeling Support in MW : Level 2 Modeling Support for RPG : Level 2 Metamodel
Level 2 Metamodel
Each construct the parser generates is an instance of an entity type. The Level 2 metamodel defines these types, or meta-entities, and their relationships. Figure 1‑2 shows the Level 2 metamodel.
Note:
The Level 2 metamodel is also referred to, in OMG terms, as the Abstract Syntax Tree Metamodel (ASTM).
Figure 1‑2
Level 2 Metamodel
Click image to expand


Level 2 Model Table

RPG Support Guide : Modeling Support in MW : Level 2 Modeling Support for RPG : Level 2 Model Table
Level 2 Model Table
Table 1‑6 describes the relationships for constructs in the Level 2 metamodel. A construct that “inherits from” other constructs can be thought of in “child/parent” terms. The child construct inherits all attribute values and relationships of the parent.
Table 1‑6
Level 2 Model Table
Construct
Relationships
Array Declaration
Inherits from Declaration
Array Reference
Index: Index of the array expression
Inherits from Variable
Binary Expression
Left operand: The binary operation
Right operand: The binary operation
Inherits from Expression
Block
Conditional Branch: The conditional phrase that controls the sequence
LoopCounter statement: The iterative statement
LoopCondition statement: The loop statement
CABXX Statement
Inherits from Jump Statement
Call Procedure
Expression: expression being called
Inherits from Statement
Call Subroutine
Subroutine: Subroutine
Inherits from Statement
Conditional
Body: The block that is controlled by the conditional
Controlling variables: The variables that control the conditional
Next Branch: The next branch
Previous Branch: The previous branch
If statement: The conditional statement
Switch statement: The switch statement
Conditional Subroutine Call
Inherits from Call Subroutine
Constant
Inherits from Expression
Data Item Reference
Inherits from Expression
Data Port
Transferred Data Items: References to all data items which are transferred by the port
Inherits from Statement
Declaration
Parameter List: Parameter List
Instances: Usages of the declared identifier
Division
N/A
Exception type
Guard phrase: Guard phrase (ON ERROR)
Expression
Call: Call of the procedure
LOOP (start value): The iterative statement
LOOP (index value): The iterative statement
LOOP (limit value): The iterative statement
LOOP (step value): The iterative statement
Port: Reference to the port which transfers this item
Expression statement: Expression statement
Unary operation: The unary operation
Binary operation (from left): The binary operation
Binary operation (from right): The binary operation
Range expression (start): Range
Range expression (end): Range
Pointer: Operand of the pointer expression
Array: Array expression
Free-form Parameters: Call of the procedure
Procedure call: Procedure
Expression Statement
Expression: Expression itself
Inherits from Statement
Field
Inherits from Declaration
File
Formats: Input and output formats for the file
Inherits from Declaration
Function Call
Free-form Parameters: parameters of the function
Inherits from Variable
Guard
Guarding statement: MONITOR statement
Exception types: Exception types
Inherits from Statement
Guard Statement
Guard: ON ERROR phrase
Inherits from Statement
I/O Statement
Inherits from Statement
If Statement
First Branch: The first branch
Inherits from Statement
Indicator Declaration
Inherits from Declaration
Interface
Procedure Body: Procedure body
Inherits from Declaration
Iterative Statement
Inherits from Statement
Jump Statement
Target: The label to which the control is transferred
Inherits from Statement
KeyField
Inherits from Declaration
KeyList
Inherits from Declaration
Keyword
N/A
Label
Statement: The tagged statement itself
Goto statements: The GoTo Statements to which the control is transferred
Inherits from Statement
LoopCondition Statement
Controlling variables: The controlled loop statement
Body: The body of the iterative statementt
Inherits from Iterative Statement
LoopCounter Statement
Start Value: The starting value for the iterative statement
Index Value: The index for the iterative statement
Limit Value: The limiting value for the iterative statement
Step Value: The step value for the iterative statement
Body: The body of the iterative statement
Inherits from Iterative Statement
Parameter description
PList: PList declaration
Inherits from Statement
PLIST statement
Call: Call of the procedure
Parameters: Parameters of the PLIST
Inherits from Declaration
Pointer Expression
Operand: Operand of the pointer expression
Inherits from Data Item Reference
Procedure
Parameters: Parameters of the call
Procedure Prototype: Procedure prototype
Procedure interface: Procedure interface
Procedure Call
PLIST: Parameters of the procedure
Inherits from Expression
Program
N/A
Prototype
Procedure Body: Procedure body
Procedure Calls: Callers to the procedure
Inherits from Declaration
Range Expression
Start: Start of the Range
End: End of the Range
Inherits from Expression
Record Format
File: File for which this is input (output) format
Inherits from Declaration
Select Statement
First Branch: The first branch
Inherits from Statement
SQL column declaration
Column usages: All references to the column
SQL column usage
Parent table instance: Reference to the parent table Column declaration: Declaration of the column
SQL cursor declaration
Cursor usages: All usages of the cursor
SQL cursor usage
Cursor declaration: Declaration of the SQL cursor
SQL table declaration
Table usages: All references to the table
SQL table usage
Table declaration: Declaration of the table
Used columns: References to all used columns
Statement
Label: the label
Subroutine
Subroutine calls: Subroutine calls
Unary Expression
Operand: Operand of the unary operation
Inherits from Expression
Variable
Controlled conditional phrase: The controlled conditional phrase
Controlled loop statement: The controlled conditional phrase
Declaration: Declaration of the referenced data item
Inherits from Data Item Reference


Construct Attributes

RPG Support Guide : Modeling Support in MW : Level 2 Modeling Support for RPG : Construct Attributes
Construct Attributes
Table 1‑7 describes the attributes of constructs in the RPG level 2 model.
Table 1‑7
Table of Attributes for RPG
Attribute
Construct(s)
Attribute Description
Alias
SQL Table Usage
String: name of the alias
Constant
Constant
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Boolean: tag indicating that the data item is named constant
DataType
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
String: specifies internal representation of the data item
Dead
Statement
I/O Statement
Label
Jump Statement
Conditional
If Statement
Select Statement
CABXX Statement
Call Subroutine
Conditional Subroutine Call
Call Procedure
Iterative Statement
LoopCounter Statement
LoopCondition Statement
Guard Statement
Guard
Subroutine
Procedure
Data Port
Expression Statement
Declaration
PLIST statement
Parameter description
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Boolean: tag indicating that the data item is not used in the program
Decision
Data Port
Boolean: denotes whether the port destination is known statically or is calculated dynamically
DeviceType
File
Enum: device associated with the file
Possible values include:
Disk
Workstation
Printer
Digits
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Integer: the number of digit positions, if the data item is of numeric type
DIRECT
Data Port
Enum: denotes whether the data are transferred in or out of the program
Possible values include:
IN (Port transfers data into the program)
OUT (Port transfers data out of the program)
INOUT (Port transfers data both into and out of the program)
EndLabel
Subroutine
String: label at end of subroutine
Exported
Procedure
Boolean: flag to denote whether this procedure is exported
ExType
Exception type
Integer: the type of the exception
FldOffset
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Integer: The relative position of the data item in the record it belongs to: offset of the first byte occupied by the data item from the memory location of the first byte of the record
Fraction
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Integer: the size of the fraction part, if the data item is of numeric type
Index
Variable
Array Reference
String: for array elements, contains exact occurrence number when known, or asterisk if unknown, for every array dimension
Kind
Division
Statement
I/O Statement
Label
Jump Statement
Conditional
If Statement
Select Statement
CABXX Statement
Call Subroutine
Conditional Subroutine Call
Call Procedure
Iterative Statement
LoopCounter Statement
LoopCondition Statement
Guard Statement
Guard
Data Port
Expression Statement
Parameter description
String: kind of the construct
Length
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Integer: the size of the memory location occupied by the data item (in bytes)
Name
Program
Keyword
Label
Call Subroutine
Conditional Subroutine Call
Call Procedure
Subroutine
Procedure
Function Call
Variable
Array Reference
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
SQL cursor declaration
SQL cursor usage
SQL table declaration
SQL table usage
SQL column declaration
SQL column usage
String: name of the construct
Occurs
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
String: number of array elements (from DIM keyword)
OpCode
Unary Expression
Binary Expressione
String: operation code
Organization
File
String: file organization
PORTNAME
Data Port
String: name that identifies the port
PORTTYPE
Data Port
Enum: type of the port
Possible values include:
Call (Port is a call to another program, with parameters passing)
Using (Port stands for parameters that are passed to the program when it is called)
Trans (Port is a start of new transaction)
Screen (Sending/receiving data to/from a screen)
Console (Unformatted input/output with a screen)
File (Port reads/writes to a file)
Winfile (Port reads/writes to a file)
SQL (Access to relational database)
Sys (Communication to the operating system: manipulating environment variables, command lines, etc.)
Text
Conditional
String: complete text of the condition
TopLevel
Declaration
PLIST statement
KeyList
KeyField
Field
Indicator Declaration
Array declaration
Record Format
File
Interface
Prototype
Boolean: tag indicating that the data item is either data structure or a standalone data item
Value
Keyword
Constant
String: the value of the keyword or constant
VarType
Variable
Array Reference
Enum: type of the variable
Possible values include:
Variable
Procedure
Indicator
KList
KField
PList
Parameter
File
Format
Field
Slice
VarUsage
Variable
Array Reference
Enum: The attribute specifies whether the value of the referenced data item is read by a statement or the referenced data item receives a value
Possible values include:
IN (data item is written by a statement)
OUT (data item is read by a statement)
INOUT (data item is both written and read by a statement)


Asset Transformation Workbench Analyzer for Eclipse

Corporate Headquarters
International Business Machines Corporation
New Orchard Road
Armonk, New York 10504
Tel +1 (914) 499-1900

www.ibm.com

© 2006 International Business Machines Corporation
All rights reserved.
This document applies to IBM Asset Transformation Workbench (product number 5724-R03) and to all subsequent releases and modifications. For the latest information about this product, please refer to the Release Notes.
No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of IBM. Information in this document is subject to change without notice and is not guaranteed to be error-free.
Licensed Materials - Property of IBM.
Product Reference: IBM Asset Transformation Workbench v2.1
Document Reference: REL7.3DOC13.A

RescueWare is a registered trademark of Relativity Technologies, Inc. All other brands mentioned in this document are trademarks or registered trademarks of their respective holders.

www.relativity.com


Relativity Modernization Workbench Copyright Page

Corporate Headquarters
Relativity Technologies
2300 Rexwoods Drive
Suite 100
Raleigh, NC 27607
Tel +1 (919) 786-2800
Fax +1 (919) 786-2850

www.relativity.com

© 2005-07 Relativity Technologies
All rights reserved.
Printed in the United States of America.

RescueWare is a registered trademark of Relativity Technologies, Inc. All other brands mentioned in this document are trademarks or registered trademarks of their respective holders.

The software supplied with this document is the property of Relativity Technologies and is furnished under a license agreement. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Relativity Technologies, Inc. Information in this document is subject to change without notice and is not guaranteed to be error-free.

For the latest information about this product, please refer to the Release Notes.


Relativity Modernization Workbench Copyright Page

Corporate Headquarters
Relativity Technologies
2300 Rexwoods Drive
Suite 100
Raleigh, NC 27607
Tel +1 (919) 786-2800
Fax +1 (919) 786-2850

www.relativity.com

© 2005-06 Relativity Technologies
All rights reserved.
Printed in the United States of America.

RescueWare is a registered trademark of Relativity Technologies, Inc. All other brands mentioned in this document are trademarks or registered trademarks of their respective holders.

The software supplied with this document is the property of Relativity Technologies and is furnished under a license agreement. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Relativity Technologies, Inc. Information in this document is subject to change without notice and is not guaranteed to be error-free.

For the latest information about this product, please refer to the Release Notes.


RPG.1.8.1.html

RPG Support Guide : Modeling Support in MW : Level 1 Modeling Support for RPG : Level 1 Metamodel


RPG.1.13.1.html

RPG Support Guide : Modeling Support in MW : Level 2 Modeling Support for RPG : Level 2 Metamodel


RPG-1004259.html

The Level 1 model for an application defines the relationships between the objects that comprise the application. These can be physical objects, like RPG files, database files, or device files, or logical objects that identify abstract program elements (database descriptions, device descriptions, jobs, and the like).


RPG-1004302.html

The Level 2 model for an object defines its syntax. It shows in abstract form how the syntactical constructs that comprise the object (data ports, procedure calls, expressions, variables, etc. ) are related.