HLASM Toolkit Feature User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the Cross-Reference Facility

HLASM Toolkit Feature User's Guide
GC26-8710-10

The Cross-Reference Facility (ASMXREF) is a flexible source code cross-referencing tool to help you determine variable and macro usage, and to locate specific uses of arbitrary strings of characters.ASMXREF reads libraries for symbols, macros, and tokens and generates reports to help you evaluate the search results.

As well as its value in maintaining applications,ASMXREF helps you quickly identify selected fields of interest.

ASMXREF provides token scanning facilities for source code in the languages such as:
  • Assembler
  • C
  • C++
  • COBOL
  • FORTRAN
  • PL/I
  • REXX
For details on all the languages supported by each report see Table 1.

ASMXREF saves any informational or error messages in a message file (for details see ASMXREF Messages).

You can use ASMXREF to generate the following reports:
Control Flow (CF)
The CF report tabulates all intermodule program references as a function of member or entry point name. It can list references either in the order of the members referring to the subject entry point or the entry point names referred by the subject member, depending on the sort order.

For each part processed, the CF report can handle up to 256 internal procedure names and 1024 entry point names.

Reference names that exceed 64 characters are truncated.

ASMXREF classifies each reference by type. The classification is language specific. For details see Control flow (CF) report.

Lines of Code (LOC)
Provides a count, arranged by part and by component, of the number of source lines and comments in the part, and the shipped source instructions (SSI), which are the number of instructions within each part scanned, both executable and non-executable, that are not spaces or comments. As well, the report shows the changed source instructions (CSI), which are the number of unique SSI that have been modified in each part categorized by added, changed, deleted, moved, and so on. In addition, the LOC Report provides a summary report of CSI arranged by programmer.
Lines of OO Code (LOOC)
Provides, for C++, the Lines of Code (LOC) per Class and per Object, and Objects per Class.
Macro Where Used (MWU)
Identifies calls to all macros, functions invoked, and all copy books copied and included. The report includes the type and frequency of the use of the macro, or function, and the reference. This report identifies external referenced entities. These entities can be subroutine calls, macro invocations or the inclusion of copy books. For details see Macro Where Used (MWU) report.
Spreadsheet Oriented (SOR)
Shows occurrences of tokens in the search library. This report processes the default set of tokens, provided withASMXREF , which contains useful fields of interest, such as DATE, and YY/MM/DD. You can supplement the default tokens with your own tokens, or turn off processing of the defaults and replace them with your own token list. You can specify tokens that ASMXREF is to include in the search generically (with wildcards), or explicitly (with the exact characters ASMXREF is to include in the search). You must specify exclude tokens explicitly. The report is in a comma-delimited format that you can import into a spreadsheet application such as Lotus 1-2-3.

When you run the ASMXREF scan phase for the TWU and SOR reports, ASMXREF generates the Tagged Source Program (TSP). The ASMXREF report phase uses the TSP to create the TWU and SOR reports. The TSP contains the original source code interspersed with ASMXREF generated comment records in the syntax of the language scanned. These comment records contain both the token string encountered and a cumulative count of the number of times ASMXREF has found the token so far in the source file. For details on the Spreadsheet Oriented report see Spreadsheet Oriented Report (SOR). For details on the TSP see Tagged Source Program (TSP).

Symbol Where Used (SWU)
Lists all the symbols (variables or macros) used in the source code and the type of reference to each symbol. For details see Symbol Where Used (SWU) report.
Token Where Used (TWU)
Shows occurrences of tokens in the search library. This report processes the default set of tokens, provided withASMXREF , which contains useful fields of interest, such as DATE, and YY/MM/DD. You can supplement the default tokens with your own tokens, or turn off processing of the defaults, and replace them with your own token list. You can specify tokens that ASMXREF is to include in the search either generically (with wildcards), or explicitly (using the exact characters ASMXREF is to include in the search). You must specify exclude tokens explicitly.

When you run the ASMXREF scan phase for the TWU and SOR reports, ASMXREF generates the Tagged Source Program (TSP). The ASMXREF report phase uses the TSP to create the TWU and SOR reports. The TSP contains the original source code interspersed with ASMXREF generated comment records in the syntax of the language scanned. These comment records contain both the token string encountered and a cumulative count of the number of times ASMXREF has found the tokens so far in the source file. For details on the TWU report see Token Where Used (TWU) report. For details on the TSP report see Tagged Source Program (TSP).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014