Use the NOCOMPILE option to compile conditionally or to only check syntax. When used with the SOURCE option, NOCOMPILE produces a listing that will help you find coding mistakes such as missing definitions, improperly defined data items, and duplicate data-names.
Checking syntax only: To only check the syntax of your program, and not produce object code, use NOCOMPILE without parameters. If you also specify the SOURCE option, the compiler produces a listing.
The following compiler options are suppressed when you use NOCOMPILE without parameters: LIST, OBJECT, OPTIMIZE, SSRANGE, and TEST.
Compiling conditionally: To compile conditionally, use NOCOMPILE(x), where x is one of the severity levels of errors. Your program is compiled if all the errors are of a lower severity than x. The severity levels that you can use, from highest to lowest, are S (severe), E (error), and W (warning).
If an error of level x or higher occurs, the compilation stops and your program is only checked for syntax.
related references
COMPILE