COBOL - Group home

New compiler option of ARCH

  

With COBOL for z/OS, V5.1, you can use the ARCH option to specify the machine architecture for which your executable program instructions are to be generated.

The syntax is ARCH(n). Parameter n is an integer between 6 and 10 inclusive, specifying the machine architecture for which instructions are to be generated. ARCH(6) is default.

If you specify a higher ARCH level, the compiler generates code that uses newer and faster instructions. Your application might abend if it runs on a processor with an architecture level lower than what you specified with the ARCH option. Use the ARCH level that matches the lowest machine architecture where your application runs.

If you are compiling on a "low-level"machine, you can specify a high-level number where you plan to run the object code.

Current supported architecture levels and groups of models are as follows:

  • 6

Produces code that uses instructions available on the 2084-xxx (z990) and 2086-xxx (z890) models in z/Architecture mode. Specifically, these ARCH(6) machines and their follow-ons include instructions supported by the long-displacement facility.

  • 7

Produces code that uses instructions available on the 2096-xxx (IBM System z9 BC) and 2094-xxx (IBM System z9 EC) models in z/Architecture mode. Specifically, these ARCH(7) machines and their follow-ons add instructions supported by the following facilities:

  • Extended-immediate facility
  • Decimal floating point facility. These instructions might be generated if decimal data is used in numeric operations.
  • 8

Produces code that uses instructions available on the 2097-xxx (IBM System z10 EC) models in z/Architecture mode. Specifically, these ARCH(8) machines and their follow-ons add instructions supported by the general instruction extensions facility.

  • 9

Produces code that uses instructions available on 2817-xxx (IBM zEnterprise 196) and 2818-xxx (IBM zEnterprise 114) models in z/Architecture mode. Specifically, these ARCH(9) machines and their follow-ons add instructions supported by the following facilities:

  • High-word facility
  • Interlocked access facility
  • Load/store-on-condition facility
  • Distinct-operands facility
  • Population-count facility
  • 10

Produces code that uses instructions available on the 2827-xxxx (IBM zEnterprise EC12) models in z/Architecture mode. Specifically, these ARCH(10) machines and their follow-ons add instructions supported by the following facilities:

  • Execution-hint facility
  • Load-and-trap facility
  • Miscellaneous-instructions-extension facility
  • Transactional-execution facility

Note:  A higher ARCH level includes the facilities of the lower ARCH level. For example, ARCH(10) includes all the facilities of the lower ARCH levels.