Problem:
How is a cross reference listing created using Net Express 4.0?
Resolution:
Use a "Cobol.dir" file (a text file consisting of compiler directives, one directive per line) with the following directives, to create a basic compiler listing file with Data Map and Cross Reference listings appended to the end of the source file listing.
....show-dir.......... - Shows the content of directives files in the source listing.
....setting"col3"..... - Includes a list of the directive settings, three directives per line in columns.
....confirm........... - Echos all subsequent directives to the screen.
....list().............. - Causes the listing file to be named "source-name.lst", where "source-name" ....................... - is the basename of the program being compiled.
....xref............... - Makes the Compiler produce a cross-reference listing.
....datamap......... - Causes the Compiler to output information on data items.
See "Compiler Control - listing" in Net Express Help, Contents, Reference, Compiler Directives, Compiler Directives by category, Compiler Control, for additional Compiler directives that control the Compler Listing file content and format.
****************************************
Using a Compiler Listing file
----------------------------------------
One interesting use that can be made of a compiler listing file is that it can be input to the compiler (cobol regprj1.lst) and the compiler will re-compile the program from the listing file. This will reproduce exactly the original production of the program because all the compiler directives are present in the listing as are all the copy books.