EXTEND (Extend Data or Index Areas)

The EXTEND function of DBUTLTY expands an existing data area or index area and formats the space acquired. The function also updates the data or index area control record, informing ddb that additional space is available.
datacom150
The EXTEND function of DBUTLTY expands an existing data area or index area and formats the space acquired. The function also updates the data or index area control record, informing
Datacom/DB
that additional space is available.
You cannot use EXTEND to decrease the size of an area.
Once the EXTEND function completes, the new area is immediately available for use without any further changes to the system. Any job that starts after the completion of the EXTEND function can use this newly allocated space.
Data and index areas can be dynamically extended when they become full.
When to Use EXTEND
Use the EXTEND function to increase the space available in a data or index area. You can use EXTEND:
  • When planning for future growth.
  • When an area becomes full or nearly full.
A Multi-Dataset Index area (I00-99) can only be extended if the IXX Index Area is initialized and able to be open for processing. This requirement does not exist for the IXX Index Area and data areas.
In Simplify mode, the function expects MUF to be enabled. This provides control and protection. If MUF is not enabled, this function should wait for MUF to enable. If you have to execute the function without MUF enabled, for example if it is needed to allow restart to execute, the function must either follow a function that can only run with MUF not enabled or follow a function to acknowledge MUF is not enabled with SET OPTION1=MUF_NOT_ENABLED. It is possible (but not recommended) to use SET OPTION1=MUF_ENABLED_OR_DISABLED. The function without MULTUSE=YES and MUF enabled does not require or want the database to be closed but there must be no open URT for any table in the base.
How Space Is Allocated for an EXTEND
The additional space into which a database data or index area is to be extended can be allocated in one of four ways:
  1. Dynamic allocation is always allowed.
    If you specified a secondary allocation parameter when you originally allocated the data set containing the area, you need not supply an z/OS JCL DD statement when running EXTEND (unless a new volume is being added).
    As long as all secondary allocations for the data set have not already been used and sufficient space exists on the last volume allocated to the area to contain the secondary allocation, the EXTEND function automatically requests another extent that is the size of the original secondary allocation specification. The function initializes this new space and resets the control record for the area accordingly.
  2. You can supply an z/OS JCL DD statement with a disposition (DISP=) of SHR or OLD and include a SPACE parameter with a secondary allocation amount. As in the previous case, the EXTEND function causes the allocation of this secondary space amount (provided all secondary allocations have not been exhausted), initializes the new space, and resets the control record.
  3. You can cause the EXTEND function to add another disk volume to the data set, allocate additional space on the new volume, and initialize the new space. To do this, you must specify an additional disk volume serial number in the z/OS JCL DD statement.
    Also, there must be less space available on the last volume currently allocated to the data set containing the area than you specify for the secondary allocation. This forces allocation of the next extent on the new volume.
    To use this method:
    1. Uncatalog the data set manually (for example, using IEFBR14).
    2. Extend the data set and specify the following in the JCL:
      • Code a SPACE parameter in the DD statement for the area that has a primary quantity equal to the initial primary allocation amount and specify the secondary quantity with the amount by which to extend the data set.
      • For the VOL=SER information, specify the volumes in the same order by which the file was allocated and extended.
      • With the new volume serial number, specify DISP=(OLD,CATLG).
  4. You can move the data or index area to another larger data set on another volume of the same device type. You can do this using a non-
    Datacom/DB
    utility.
    In this case, the EXTEND function compares information from the IBM Data Extent Block (DEB) to the control record information. EXTEND then formats any new blocks based on the extent information from the DEB. The function updates the control record to reflect the new block count.
Verifying the Extend
Use the CXX Report Type A (see Type A - Directory Space Utilization) to verify that the total number of tracks match what the VTOC has for all volumes on which the data set is placed. If the number of tracks are wrong, restore the data set.
Successful Execution Requirements and Controls
Environmental
 
Requirements
 
when MULTUSE=NO, Simplify NO, or MUF down
  • The database may 
    not
     be open for update anywhere.
  • The database may 
    not
     be open in any MUF for read.
  • The database may 
    not
     have any table in 
    unloading
     status.
Environmental 
Requirements
 when MULTUSE=NO, Simplify YES, and MUF enabled
  • The database may be open for update but must have no users.
Environmental 
Controls
 when MULTUSE=NO, Simplify NO, or MUF down
  • The database will be opened for update.
  • The utility has no knowledge about current ACCESS database or area status.
  • The utility sets no ACCESS database or area status.
Environmental 
Controls
 when MULTUSE=NO Simplify YES and MUF enabled
  • The database will be opened for update if not already.
  • All areas will be closed if open.
  • The utility will execute with every ACCESS database or area status.
  • The utility sets protection to block other incompatible DBUTLTY functions.
Environmental
 
Requirements
 
when MULTUSE=YES
  • The database may or may not be open for update in the connected MUF.
  • The database may 
    not
     be open for update in another MUF or Single User job.
  • The database may 
    not
     have any table in 
    unloading
     status.
  • The database ACCESS must be set OPTIMIZE and WRITE/UTLTY.
  • The area ACCESS must be set WRITE/UTLTY.
  • The area may have no table in an open URT.
  • The area may 
    not
     have any other MULTUSE=YES utility executing.
  • The area must be closed.
  • When MULTUSE=YES, this function will not be allowed against a Data Sharing MUF if more than one is executing.
Environmental
 
Controls
 
when MULTUSE=YES
  • The database will be opened by MUF for update.
  • The utility sets ACCESS area OFF (utility set).
  • The utility sets EXTEND executing this MUF this database or area.
How to Use EXTEND
Execute the EXTEND function using the following command format:
►►─ EXTEND AREA= ─┬─ 
aaa
 ─┬────────────────────────┬─┬─ ,DBID=
n
 ──────────────►◄                   │       └─ ,MULTUSE= ─┬─ NO ◄ ─┬─┘ │                   │                     └─ YES ──┘   │                   └─ 
index-area
 ─┬───────────────┬───┘                                  └─ IXXAREA=
aaa
 ─┘
Command
  • EXTEND
    Invokes the function for Index or data area expansion and formatting.
Required Keywords
  • AREA=
    Identifies the area to be extended, where 
    aaa
     is the name of the area to extend, and where 
    index-area
     indicates that the index area of the database is to be extended.
    • Valid Entries:
      the index area of the database or the DATACOM-NAME of the data area in the database
    • Default Value:
      (No default)
  • ,DBID=
    Identifies the database for which the area expansion is required.
    • Valid Entries:
      DATACOM-ID of the database
    • Default Value:
      (No default)
Optional Keyword
  • ,MULTUSE=
    (For area level DBUTLTY control only.)
     In support of area level DBUTLTY control, specifying MULTUSE=YES in the EXTEND function for a data area allows a single area in a database to be extended with no disabling of the other areas in the database. When MULTUSE=YES, the function executes in a format that is a combination of MUF and Single User modes. The database involved must be able to be opened for update in the MUF address space. The area, however, must have no tables open. Once begun, the function does not allow other tasks to open any tables in the area being processed. Other tables in the database, but not in the area, may be open for read or update in the same MUF. The actual data set open is performed in the utility region, and the JCL requirements are applied to the utility region.
    The operating system performs the catalog portion of the DD statement DISP option when the DD statement is removed. This occurs at job step termination. Therefore, if you were to change the volume list during an extend, do not expect the MUF to correctly open this area until after the step completes. This restricts the DBUTLTY functions that succeed when following a catalog change.
    When you specify or allow the default of MULTUSE=NO in the EXTEND function for data areas, the function executes completely in Single User mode.
    For more information about area level DBUTLTY control, see Area Level DBUTLTY Control.
    • Valid Entries:
      NO or YES
    • Default Value:
      NO
  • IXXAREA=
    aaa
    The IXXAREA= keyword is optional when AREA=IXX is also specified and if the database has a single index area, but if specified, it must be specified as IXX. If the database has a Multi-Dataset Index, however, the keyword is required and must be set to a single index area, that is, the name of one of the index areas (IXX or I
    nn
    , where 
    nn
     can be 00 to 99).
    • Valid Entries:
      IXX or I00 to I99
    • Default Value:
      (No default)
Example JCL (EXTEND)
The following shows the command to extend data area DEM for database 001 and to format the newly extended space.
Use the following as a guide to prepare your JCL. The JCL statements are for example only. Lowercase letters in a statement indicate a value you must supply. Code all statements to your site and installation standards.
 //jobname    
See the note above and 
.
 //       EXEC PGM=DBUTLTY,REGION=2M  //STEPLIB    
See the note above and 
.
 //CXX      DD DSN=cxx.data.set,DISP=SHR           Directory data set  //SYSIN    DD *                                   Command Input           EXTEND  AREA=DEM,DBID=1  /*
In the DEM001 statement above, the space parameter is not required if the DEM area was previously allocated with secondary extents. It is required when changing the secondary value or when a new volume is added.
Sample Report
Following is a sample report page. For an example report header, see Sample Report Headers.
 
                    CONTROL CARD(S)                     .........1.........2.........3.........4.........5.........6.........7.........8                     EXTEND AREA=DEM,DBID=1                       FUNCTION=EXTEND                        AREA=DEM                        DBID=1
This page of the report shows the following:
  • The command exactly as entered.
  • An analysis of keywords encountered and expected. Any errors found are flagged with a note in the left margin.
  • Any messages related to syntax processing.
                    DEM - STATUS INFORMATION                     DEVICE TYPE -    3380                     BLOCK LENGTH -  1,024                     BLOCKS/TRACK -     31                                        BLOCKS IN USE -        13                     BLOCKS UNUSED -       142                     TOTAL BLOCKS -        155                     TOTAL TRACKS -          5                     PERCENT FULL -          9
This page of the report shows the following:
Report of space allocated and used in the area after the EXTEND has completed.
If a system failure has occurred,
Datacom/DB
may be unable to accurately determine the number of "Blocks in Use" and "Blocks Unused." When this occurs,
Datacom/DB
reports blanks in these fields as well as in the "Percent Full" field.