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:
Information about a file that has many different names can be grouped under one descriptive title. A single file (for example, a transaction file) may be named differently (for example, TRANSFILE, TRANS-IN, TRANS-OUT) in the system of programs. Control statements can be used to assign a descriptive name to such a file and to connect the appropriate descriptions from specific programs to that name.
Record descriptions can be associated with a specific file. Within the DATA DIVISION of each program, any number of record descriptions that apply to the same file can exist. Control statements can be used to specify which record descriptions apply to a specific file.
Record descriptions can be associated with a specific section of the program. Record descriptions can be present in the FILE, WORKING-STORAGE, or LINKAGE sections of programs. Control statements can be used to designate the appropriate section if necessary.
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.
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.
Copyright © 2013 CA.
All rights reserved.
|
|