Note:
The documentation updates provided here only cover the changes
introduced with Natural Optimizer Compiler Version 8.3.
For the changes in installation, see Installing the Natural Optimizer Compiler Version 8.3.4 on z/OS, z/VSE and BS2000/OSD in the Natural Installation documentation.
Note:
This is an extract of the chapter
Optimizer
Options and only describes the changes specific to the
Natural Optimizer Compiler Version
8.3.
The ARCH
option specifies the hardware architecture level
to be used for generating code for executable Natural objects.
ARCH
allows the Natural Optimizer Compiler to use
additional instructions that can improve the performance of the generated code,
depending on the IBM hardware facility installed.
For detailed information on architecture levels, see the related literature from IBM.
The following architecture levels can be specified with the
ARCH
option of the Natural Optimizer Compiler (NOC), the Natural
PARSE XML
statement
and/or International
Components for Unicode for Software (ICS):
Level Value | Supported By | IBM Hardware Facility Required |
---|---|---|
0 |
All | Specifies that no architecture level is used. This is the default setting for compatibility with all mainframe platforms supported by Natural. |
1 to 4 |
All | These values are not evaluated and treated as
ARCH=0 .
|
5 to 6 |
NOC only |
|
7 |
NOC only |
|
8 |
NOC only |
|
9 |
PARSE XML and ICS only |
|
10 |
NOC only |
|
11 |
NOC only |
|
Warning: An operation exception error (abend code S0C1) can occur if code generated with an architecture level greater than 0 is executed on
a machine where the corresponding hardware facility is not
installed. |
When ARCH=10
is set, the Natural Optimizer Compiler uses
the decimal floating point (DFP) format for calculating intermediate results.
This can increase the performance by up to 40 % for statements that perform
particular arithmetic operations.
This section describes the statement operations that benefit from
ARCH=10
and the restrictions that apply when using
ARCH=10
.
- Suitable Operations
The following arithmetic operations on variables of the Natural data formats I (integer), N (numeric unpacked) and P (packed numeric) benefit from
ARCH=10
:
Value assignments, except the following:
I to I,
N to N with identical length and precision, and
DIGTCHCK=OFF
,P to I,
P to P, and
P(m,n) to N if m+n is greater than 15.
Addition, subtraction, division and multiplication, except the following:
P(m,n) + P(o,p) if max(m,o) + max (n,p) is greater than 34, and
P(m,n) * P(o,p) if m+n+o+p is greater than 34.
Comparison between variables, except the following:
P with P
- Compatibility
Consider the following Natural runtime incompatibilities between
ARCH=10
andARCH=8
:
A variable of the Natural data format N (numeric zoned) must contain numbers only; blank and non-numeric characters are not allowed and cause an S0C7 termination error. If such an error occurs, Natural issues a NAT7024 error instead of a NAT0954 to clearly indicate that the error is caused by a variable that does not contain numeric data.
Natural can issue a NAT1305 (truncated numeric value) instead of a NAT1301 error (intermediate result too large) for the following reason: The DFP format is used for calculating intermediate results and an overflow is only detected at the end of the arithmetic operation when the DFP is converted into the format of the result.
When ARCH=11
is set, the Natural Optimizer Compiler uses
the decimal floating point (DFP) format for calculating arithmetic operations
with packed operands. This can improve the execution speed for assignments,
comparisons and calculations if at least one packed operand is involved.
The Natural Optimizer Compiler generates optimized code for Natural statements with Unicode strings if the following requirements are met:
Statement | Requirement |
---|---|
All statements | All operands used in the statement must be of the type Unicode. |
EXAMINE |
The ARCH option must be set to
a value greater than or equal to 6 .
|
IF
|
|
MOVE
|
The ARCH option must be set to
a value greater than or equal to 5 .
|
The UNICC
option controls the generation of optimized
code for IF
, DECIDE FOR
and DECIDE ON
statements that contain Unicode operands.
Valid values for UNICC
are:
Value | Explanation |
---|---|
ON |
Generates optimized code and checks whether
COLLATE=OFF is
set (see the CFICU profile parameter in the
Parameter Reference documentation).
If |
FORCE |
Generates optimized code analogous to
ON but without COLLATE=OFF check.
The code optimized with |
OFF |
Optimized code is not generated.
|