COMPOPT [option=value
...]
|
This system command is used to set various compilation options. The options are evaluated when a Natural programming object is compiled.
If you enter the COMPOPT
command without any
options, a screen is displayed where you can enable or disable the options
described below.
The default settings of the individual options are set with the corresponding profile parameters in the Natural parameter file.
This document covers the following topics:
The following compiler options are available. For details on the purpose of these options and the possible settings, see the description of the corresponding Natural profile parameter:
KCHECK
|
PCHECK
|
DBSHORT
| PSIGNF
| TQMARK
| THSEP
|
GFID
|
MASKCME
You can specify compiler parameters on different levels:
The default settings of the individual compiler parameters are
specified using the
Compiler
Options category of the Configuration Utility and are
stored in the Natural parameter file NATPARM
.
At session start, you can override the compiler option settings by specifying the corresponding profile parameters.
During an active Natural session, there are two ways to change the
compiler parameter values with the COMPOPT
system
command: either directly using command assignment (COMPOPT
option=value
)
or by issuing the COMPOPT
command without options
which displays the Compilation Options
screen. The settings assigned to a compiler option are in effect until
you issue the next LOGON
command to another library.
At LOGON
to a different libary, the default settings
(see item 1 above) will be resumed. Example:
OPTIONS KCHECK=ON DEFINE DATA LOCAL 1 #A (A25) INIT <'Hello World'> END-DEFINE WRITE #A END
In a Natural programming object (for example: program, subprogram),
you can set compiler parameters with the OPTIONS
statement. Example:
OPTIONS KCHECK=ON WRITE 'Hello World' END
The compiler options defined in an OPTIONS
statement will only
affect the compilation of this programming object, but do not update settings
set with the command COMPOPT
.