What is the procedure and syntax required to do an EXTEND SPACE on an area?

Document ID : KB000024352
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The procedure to do an EXTEND SPACE is documented in the Database Administration Guide in section 26.5.2 "Extending an Area's Page Range".
This document will provide sample syntax required to implement this procedure.

Solution:

Assume the area currently has 15000 pages and we want to extend it to 30000. This is the procedure and sample syntax required to do an EXTEND SPACE on the area.

  1. Use OCF or IDMSBCF to alter the MAXIMUM SPACE to 30000, add a new file and expand space by 15000 pages. Changing the MAXIMUM SPACE requires a separate ALTER AREA statement.
    ALTER PHYSICAL AREA segment_name.area_name
    MAXIMUM SPACE 30000 PAGES
    ;

    CREATE
    FILE segment_name.file_name
    ASSIGN TO file_name
    DSNAME 'dataset-name'
    NONVSAM
    ;

    ALTER PHYSICAL AREA segment_name.area_name
    EXTEND SPACE 15000 PAGES
    WITHIN FILE file_name
    FROM 1 FOR 15000 BLOCKS
    ;

  2. Generate, punch, and link all DMCLs that contain the segment with which the area is associated. IDMSBCF syntax is:
    GENERATE DMCL dmcl_name;
    PUNCH DMCL LOAD MODULE dmcl_name;

  3. Allocate a new database file to contain the additional pages and initialize the file using the new DMCL. IDMSBCF syntax is:
    FORMAT FILE segment_name.file_name;

  4. Make a backup of the area.

  5. Make the DMCLs and the new file available to the IDMS CV environment.