FORTRAN Reference Manual

Compiler Directives
FORTRAN Reference Manual528615-001
10-22
ERRORFILE Compiler Directive
Considerations
The ERRORFILE directive must appear either on the FORTRAN compiler
command line after the semicolon following the object file name, or in the source
input file preceding the first FORTRAN statement. If you include an ERRORFILE
directive after the first FORTRAN statement, the compiler issues an error message
and ignores the directive.
If you supply two or more properly placed ERRORFILE directives, the compiler
uses the first one and issues a warning message for each of the others.
If the source input file is anything other than an EDIT format file, the compiler
issues a warning message and ignores the ERRORFILE directive.
The ERRORFILE directive causes the FORTRAN compiler to log all errors and
warnings to the specified file, which it creates as an entry-sequenced disk file with
file code 106.
If the file already exists, and it is an entry-sequenced disk file with file code 106,
the compiler purges it so the file does not accumulate messages from multiple
compilations. If the compiler is unable to purge the existing file, or if the file is
anything other than an entry-sequenced disk file with file code 106, the compiler
issues a warning message and proceeds as if the ERRORFILE directive were not
present.
The compiler creates the new file only if any error and warning messages are
issued during the compilation. The trailer page at the end of the compiler listing
states one of the following:
n messages written to error file file-name
Error file file-name was not created
Using the File Produced by ERRORFILE
The TACL command FIXERRS runs the TEDIT text editor with one window
showing an error message and the other window showing a portion of the source
file surrounding the site of the error. After the compilation, enter the TACL
command
1> FIXERRS file-name
or
1> FIXERRS file-name ; commands
File-name is the name of the error file specified in the ERRORFILE compiler
directive, and commands is a sequence of one or more TEDIT commands.
FIXERRS runs TEDIT, which obeys the commands, if any, and then gets the first
message in the error file. TEDIT displays the text of the error message in the top
part of the screen, and the source text surrounding the error in the remainder of the
screen. Correct the source text; then use the TEDIT macros NEXTERR and