DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9 -116
WARNINGS Command
•
If WARNINGS is specified but
max-warnings
is omitted, DDL stops compilation
after the first warning; thus, WARNINGS is the same as WARNINGS 1.
•
When compilation terminates because the specified number of warnings is
exceeded, DDL closes an open dictionary and any open files, issues session
statistics, and terminates.
•
The specified maximum number of warnings applies only to warnings that occur
after the appearance of the WARNINGS command. For example, if two warnings
had occurred before a ?WARNINGS 5 command appeared, the seventh warning to
occur (the fifth warning after the command appeared) would halt compilation.
•
If the NOWARN command is in effect, you cannot use the WARNINGS command.
•
The WARNINGS command does not count the number of occurrences of
conditions that result in a warning, but instead counts the number of messages
issued that begin with *** WARNING ***. Some warning conditions can generate
more than one such message. For example:
*** WARNING *** COBOL85 OUTPUT DIAGNOSTICS:
*** WARNING *** Unsupported data type in element A
*** WARNING *** Unsupported data type in element B
If, for example, ?WARNINGS 3 had been specified, compilation would terminate
after this condition occurred.
WARNINGS Command Examples
The following WARNINGS command directs the DDL compiler to stop compiling when
it encounters the third compilation warning:
?WARNINGS 3
If a third compilation warning is encountered, DDL issues the warning message for the
third warning, followed by the fatal error message:
Too Many Warnings - Compilation Terminating.
In the following example, the absence of a WARNINGS command allows compilation
to continue in a section of the schema regardless of warnings; a WARNINGS 1
command in a following section stops compilation at the first subsequent warning:
?SECTION start
.
.
.
?SECTION rest-of-schema
?WARNINGS 1
.
.
.
Compile regardless of warnings
Stop compiling source if any
warning is encountered
VST934.vsd