STGMDL(*INHERIT | *SNGLVL | *TERASPACE)

The STGMDL keyword specifies the storage model for the program or module.
  • *SNGLVL is used to specify the single-level storage model.
  • *INHERIT is used to specify the inherit storage model.
  • *TERASPACE is used to specify the teraspace storage model.

When a single-level storage model program or service program is activated and run, it is supplied single-level storage for automatic and static storage. A single-level storage program or service program runs only in a single-level storage activation group. A program compiled with DFTACTGRP(*YES) must be a single-level storage model program.

See DFTACTGRP(*YES | *NO) for information on how the STGMDL keyword affects the setting of the DFTACTGRP keyword.

When a teraspace storage model program or service program is activated and run, it is supplied teraspace storage for automatic and static storage. A teraspace storage program or service program runs only in a teraspace storage activation group.

When an inherit storage model program or service program is activated, it adopts the storage model of the activation group into which it is activated. An equivalent view is that it inherits the storage model of its caller. When the *INHERIT storage model is selected, *CALLER must be specified for the activation group through the ACTGRP parameter or keyword.

An inherit storage model module can be bound into programs and service programs with a storage model of single-level, teraspace or inherit.

A single-level storage model module can only be bound into programs and service programs that use single-level storage.

A teraspace storage model module can only be bound into programs and service programs that use teraspace storage.

If the STGMDL keyword is not specified, then the value specified on the command is used.