The Natural Optimizer Compiler is particularly effective for programs that contain a considerable amount of data manipulation, such as computation, transfer, and logical condition processing.
The Natural Optimizer Compiler compiles the following statements to machine code:
assignment statements (ASSIGN
and MOVE
)
RESET
arithmetic statements (COMPUTE
, ADD
,
SUBTRACT
, MULTIPLY
, DIVIDE
)
conditional statements (IF
, DECIDE
)
control statements (FOR
, REPEAT
)
ESCAPE
COMPRESS
EXAMINE
with the following clauses only:
GIVING NUMBER
, GIVING POSITION
or
GIVING LENGTH
(see also the Natural
Statements
documentation).
GIVING INDEX
is not optimized. Example:
EXAMINE #TEXT FOR #A GIVING NUMBER #NMB1 EXAMINE #TEXT FOR #A GIVING POSITION #POSEX5 EXAMINE #TEXT FOR #A GIVING LENGTH #LGHEX6
The Natural Optimizer Compiler does not compile the following statements:
I/O statements (DISPLAY
, WRITE
,
READ
/WRITE WORK FILE
).
complex special statements such as SEPARATE
.
statements that pass control to another programming object such as
FETCH
, PERFORM
, CALLNAT
,
CALL
.
statements that perform database access (READ
,
FIND
, HISTOGRAM
, GET
,
UPDATE
, DELETE
, END TRANSACTION
,
BACKOUT TRANSACTION
)
Note:
The options the Natural Optimizer Compiler provides cannot be used
for specifying statements to be optimized as described in the
Optimizer Options.