Previous Topic: Cross Reference ProcessorNext Topic: Developing a File of Control Statements


Overview

Purpose of the processor

The main purpose of the Cross-Reference Processor is to produce the System Data Cross-Reference Report. The control statements associated with running this component allow the user to specify the organization of the information to be included in this report as follows:

File of control statements

A file of control statements is illustrated in the following figure. The parameter statement specifies processing options for the run. The rest of the file consists of sets of control statements (one set for each subset of records for which cross referencing is desired). Each set contains a title statement and one or more selection statements. Syntax and rules for control statements are presented later in this chapter.

Cross-Reference Processor

Establishing processing options

The parameter statement establishes processing options for the run. Each set of control statements identifies a group of records (most commonly a file) for which an individual cross-reference report is to be produced.

Assigning a title to the report

A set of control statements assigns a descriptive title to the report on the subset of records with the title statement and specifies, with selection statements, the 01-level records that are to be included in the report. Typically, many sets of control statements are specified in the file of control statements.

System Data Cross-Reference report

During execution, the Cross Reference Processor cross references data elements throughout the system of programs, as directed by the control file, and produces a series of reports (one for each set of control statements). These reports are known collectively as the System Data Cross-Reference Report. In the reports, all PROCEDURE DIVISION statements using a specific data element are listed below the element. Additionally, all data elements are identified by their data names and associated with their program names and records names. Source line numbers for each data name and PROCEDURE DIVISION statement are also supplied.

Sample report

Because the System Data Cross-Reference Report lists data elements in order by starting columns, synonymous elements are grouped together and overlapping data fields are close to one another in the report. Thus, all uses of any column or range of columns is easy to research, as shown below:

      SYSTEM DATA CROSS REFERENCE   FOR REPORT:  CUSTOMER RECORD                 DICTIONARY LOADER       dd mmm yy 1425   PAGE   2

      FROM  TO  LV  DATA NAME           SRC LN PROG ID   REC NAME           SIZE  USAGE    OCCURS            QUALIFIER                                                                                          REF LN REF STATEMENT       1     10  03  CUST-NUMBER         047000 PRANDEM1  CUSTOMER           10    DISP                       CUSTOMER-FILE                                                                                          131000 MOVE SPACES TO CUST-NUMBER                                                                                          138000 IF ORD-CUST-NUMBER = CUST-NUMBER                                                                                          144000 MOVE CUST-NUMBER TO RPT-CUST-NO                 03  CUST-NUM            044000 PRANDEM2  CUSTOMER           10    DISP                       CUSTOMER-FILE                                                                                          190000 MOVE CUST-NUM TO RPT-CUST-NO       11     30 03  CUST-NAME           048000 PRANDEM1  CUSTOMER           20    DISP                       CUSTOMER-FILE                                                                                          145000 MOVE CUST-NAME TO RPT-NAME                 03  CUST-NAME           045000 PRANDEM2  CUSTOMER           20    DISP                       CUSTOMER-FILE                                                                                          091000 MOVE CUST-NAME TO RPT-CUST-NAME                 03  CUST-NAME           041000 PRANDEM3  CUST               20    DISP                       CUSTFILE                                                                                          064000 MOVE CUST-NAME TO MAIL-LINE-1

Dictionary of Data Names reports

The Dictionary of Data Names Report is an optional report that can also be produced by a Cross Reference Processor run. This report lists all data elements alphabetically with additional information that points to the definitions of data items in the source code. Thus, this report can be used to control changes in programs, files, records, or data elements.