16.15 The DATA Statement

The DATA statement defines the default attributes for all data segments within the application or DLL. The SEGMENTS statement can override this default for one or more specific segments.

Syntax

DATA [[attribute...]]

Remarks

The attributes field accepts one or more optional attributes: instance, load, movable, readonly, and shared. Each can appear once, in any order. These attributes are described in “CODE, DATA, and SEGMENTS Attributes” on topic . By default, all data segments have the following attributes:

SHARED LOADONCALL READWRITE FIXED

Example

The following example defines the application's data segment so that it cannot be shared by multiple copies of the program and it cannot be written to. By default, the data segment can be read and written to, and a new DGROUP is created for each instance of the application.

DATA NONSHARED READONLY