Natural Optimizer Compiler Version 8.3 - Documentation Updates

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.5 on z/OS, z/VSE and BS2000 in the Natural Installation documentation.

Optimizer Options under Natural Optimizer Compiler Version 8.3

This is an extract of the chapter Optimizer Options and only describes the changes specific to the Natural Optimizer Compiler Version 8.3.

ARCH Option

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
  • z800 or z900
    Extended-Translation Facility 2

  • z890 or z990
    HFP Multiply-and-Add/Subtract Facility

7 NOC only
  • z9 to z109
    Extended-Immediate Facility

8 NOC only
  • z10
    General-Instructions-Extension Facility

  • z10
    Execute-Extensions Facility

9 PARSE XML and ICS only
  • zEnterprise 196
    Load/Store-on Condition Facility
    Distinct-Operands Facility

10 NOC only
  • zEnterprise EC12 (zEC12)
    Decimal Floating-Point Facility
    Decimal Floating-Point Zoned-Conversion Facility

11 NOC only
  • zEnterprise z13
    Decimal Floating-Point Packed-Conversion Facility

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.

Support for Architecture Level 10

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


Consider the following Natural runtime incompatibilities between ARCH=10 and ARCH=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.

Suppprt for Architecture Level 11

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.

Prerequisites for Code Generation with Unicode Operands

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.



  • All Unicode character strings must be normalized.

  • The ARCH option must be set to a value greater than or equal to 5.

  • The UNICC option must be set to ON or FORCE.

  • The COLLATE option of the CFICU profile parameter must be set to OFF (see the Parameter Reference documentation).




The ARCH option must be set to a value greater than or equal to 5.

UNICC Option

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 COLLATE=ON is set, execution of the optimized code will fail with a NAT7023 Natural system error.

FORCE Generates optimized code analogous to ON but without COLLATE=OFF check.

The code optimized with FORCE performs better than the code optimized with ON but can cause wrong results if COLLATE=ON is set.

OFF Optimized code is not generated.

OFF is the default setting.