COBOL Manual for TNS and TNS/R Programs
Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
22-48
Source Program Listing
Text Retrieved by SOURCE Directive
The compiler does not mark lines containing text that it copied from a SOURCE library.
The compiler directives SHOWFILE and NOSHOWFILE determine whether the
compiler listing indicates when the compiler stops reading from one source file and
starts reading from another. The default, NOSHOWFILE, prevents the compiler from
reporting when it switches from one source file to another. The alternative, SHOWFILE,
causes the compiler to report each time it starts reading from a new source file by
printing a line of the form:
Source file: [n] filename yyyy-mm-dd hh:mm:ss
The n is the ordinal number that the compiler assigned to the source file. Initially, n is
1, and the compiler increments n by 1 every time it encounters a SOURCE directive.
The filename is the fully qualified name of the new source file. The remainder of the
line is the date and time when that file was last modified.
SQL/MP and SQL/MX Statements
SQL/MP or SQL/MX statements embedded in your HP COBOL program always
appear in the compiler listing, but their format depends on whether you used the
preprocessor to produce the object file.
For SQL/MP statements, using the preprocessor is optional (see the SQL/MP
Programming Manual for COBOL).
For embedded SQL/MX statements, you always use the preprocessor to produce the
object file (see the SQL/MX Programming Manual for C and COBOL).
If you used the preprocessor, the SQL/MP or SQL/MX commands in your HP COBOL
source program appear in the compiler listing in their processed form (that is, as
SQL/MP or SQL/MX data structures, PERFORM statements, and calls to TAL
routines). If the compiler detects an error in a processed SQL/MP or SQL/MX
statement, it prints the error message after the offending SQL/MP or SQL/MX data
structure, PERFORM statement, or TAL routine call.
If you do not use the preprocessor, the SQL/MP or SQL/MX commands in your
HP COBOL source program appear in the compiler listing exactly as they appear in the
source program. SQL/MP or SQL/MX data structures, PERFORM statements, or calls
to TAL routines that the compiler generated do not appear in the compiler listing
(except called or included data structures). If the compiler detects an error in an
embedded SQL/MP or SQL/MX statement, it prints the error message after the
offending SQL/MP or SQL/MX statement itself.