REMOVE (Remove Key ID)

The REMOVE function processes the Index Area for the specified database and deletes the entries for the specified key ID.
datacom150
The REMOVE function processes the Index Area for the specified database and deletes the entries for the specified key ID.
You cannot perform the REMOVE function while any other task is processing the database.
The following topics are discussed on this page:
When to Use REMOVE
When you change a key definition's length, the old key information must be removed from the Index before rebuilding the Index with the LOAD or Retrieve Index (RETIX) functions. A key's information can be removed from the Index using the REMOVE function, or by initializing the Index. In most cases, REMOVE is preferred because DBUTLTY does not have to rebuild the remaining key definitions when the LOAD or RETIX is executed.
When a large database is involved, executing REMOVE for the key ID(s) whose length(s) changed followed by LOAD or RETIX is generally faster. This is because the Index is rebuilt in a merge operation; so, DBUTLTY does not have to rewrite entries for key IDs that were not changed or deleted. However, when the database contains a single area with fewer than 100,000 records, initializing the Index (using INIT) is generally faster than using REMOVE before performing a LOAD or Retrieve Index (RETIX). In all other cases, REMOVE is recommended.
Changing a Key Definition Length
Use one of the following methods to rebuild a database Index after physically changing a key definition's length:
  • Run the REMOVE and RETIX with MINIMAL=YES functions.
  • Run the REMOVE and LOAD functions.
  • Run the INIT and RETIX functions.
  • Run the INIT and LOAD functions.
How to Use REMOVE
The MUF must be active when you execute this command. To perform the REMOVE function, supply the following command to DBUTLTY. The REMOVE function searches every index area for the database, so it works with the same options for single index area databases and Multi-Dataset Index areas.
►►─ REMOVE AREA=IXX,DBID=
n
,KEYID=
x
 ───────────────────────────────────────────►◄
Command
  • REMOVE
    Invokes the function to remove a key ID from the Index Area.
Required Keywords
  • AREA=IXX
    Identifies the area to be affected as the Index.
  • ,DBID=
    Specifies the database containing the key ID to be removed.
    • Valid Entries:
      DATACOM-ID of the database
    • Default Value:
      (No default)
  • ,KEYID=
    Specifies the key ID to be removed. You should generate an Index Report to verify the key ID (see Index Area (IXX) Reports).
    • Valid Entries:
      DATACOM-ID of the key in the database specified
    • Default Value:
      (No default)
Example JCL (REMOVE)
The following shows the command to remove Key ID 1 from the Index Area of database 1.
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 previous note and 
JCL Requirements
.
 //       EXEC PGM=DBUTLTY,REGION=2M  //STEPLIB    See the previous note and 
JCL Requirements
.
 //CXX      DD DSN=cxx.data.set,DISP=SHR           Directory data set  //SYSIN    DD *                                   Command Input           REMOVE    AREA=IXX,DBID=1,KEYID=1   /*
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                     REMOVE AREA=IXX,DBID=1,KEYID=1                       FUNCTION=REMOVE                        AREA=IXX                        DBID=1                        KEYID=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.
                   IXX - STATUS INFORMATION                    DEVICE TYPE -    3380                    BLOCK LENGTH -  3,860                    BLOCKS/TRACK -     11                                       BLOCKS IN USE -                    BLOCKS UNUSED -        55                    TOTAL BLOCKS -         66                    TOTAL TRACKS -          6                    PERCENT FULL -         17
This page of the report indicates the status of the Index upon successful completion.