Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CLOSE-SPACE

Close user space physically

Scope of validity

DBH administration

See also

Function

The CLOSE-SPACE statement physically closes the specified user space.

Partitions of a partitioned table located on this space are marked as “logically not available”.

In the ongoing DBH session you can use the administration statement SHOW-PARTITIONS (see "SHOW-PARTITIONS") to be shown whether partitions are available. The administration statement REUSE-PARTITIONS (see "REUSE-PARTITIONS") enables you to restore the logical availability. Further information on partitions is provided in the “ Core manual”.

The prerequisite for this is that the user space must be free of transactions. This is ensured by the DBH for the duration of the close operation. You can find out which users are currently using a space by using the SHOW-SPACE-USERS statement.

In the following situations it is necessary to close a user space physically:

  • when a foreign copy is created using the TimeFinder function (see the “ Core manual”)

  • when private disks are used for spaces and the storage area of the spaces is to be changed (with the BS2000 command MODIFY-FILE-ATTRIBUTES, see the BS2000 manual “ Commands”)

Note that closing the user spaces does not lock them in the sense that it prevents further accesses. The space is opened again each time it is accessed. You can prevent this happening by issuing the CLOSE-SPACE statement in a lock sequence. Lock sequences are opened with BEGIN-LOCK-SEQUENCE. END-LOCK-SEQUENCE terminates the sequence and unlocks the space again.

If the space is already closed when the statement is issued, the statement is executed without a message being issued. Logical files or cursor positions that reference the space are lost when it is physically closed.

CLOSE-SPACE

SPACE-NAME = <filename 1..18 without-cat-user-gen-vers>

,CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>

Operands

SPACE-NAME = <filename 1..18 without-cat-user-gen-vers>

Name of the space to be closed. The name of the space is specified without the physical database name.

CATALOG-NAME = <filename 1..18 without-cat-user-gen-vers>

Logical name of the database to which the space to be closed belongs


Administration command in ISP format and at the CALL DML interface

The CLOSE,SPACE administration command corresponds to the CLOSE-SPACE administration statement here.

CLOSE,S[PACE]=space-name,C[ATALOG]=catalog-name