The OPEN PARTITIONS option applies only to partitioned structures. The OPEN PARTITIONS option specifies the number of different partitions of the structure that can be in use concurrently for the database as a whole.
A partition is opened only when a record in the partition is referenced. Once the partition is open, it remains open while new partition masters with the same partition key are accessed. When a partition master with a different partition key value is retrieved, the partition is closed. Subsequent references to different partitions causes these partitions to be opened and closed in turn. A program that invokes the partition master data set only once can have at most one partition open. A program that invokes the partition master data set twice can have at most two partitions open, and so on.
The same principle applies when the partitioned structure is invoked by different programs. If two programs are referencing the same partition, then the partition is opened when the first program references it. It is then shared by both programs. The partition is closed when the last program using the partition retrieves a partition master with a different partition key value.
All of the variables and buffers required for a partitioned structure are duplicated for each partition; thus, more open partitions require more memory. The default value for the OPEN PARTITIONS option is 1 and the maximum value is 15. An attempt to open more partitions than specified results in a LIMITERROR error.