Extracting data

With Extract (option 3.3), you can extract all or selected segments from an IMS database, and save them to a sequential data set. After extracting the segments, you can use Load (option 3.4) to load them into another IMS database.

The types of extracts that can be performed are:
  • A full database extract, including a full extract of any logically related databases.
  • A partial database extract, containing segments selected by a combination of:
    • A file containing the root segment key values to determine the database records you want to extract.

      You can create this file when editing a database, by entering the XKEY command.

    • Extract criteria specifying the segments you want to extract and field selection criteria to select the database records to be extracted.
    • Relationship criteria specifying how logical segments are chased.

Here are two example uses for Extract:

Creating a small test database from a large production database
You can extract a relatively small number of segments from a large production database, then load those segments into a separate database for application testing.
Querying the database
You can use a combination of criteria to extract only those segments whose fields match particular values.

To print a formatted extract of the IMS Segments, use the IPR (IMS print) function.

Note: The Extract utility can use a Dynamic PSB or a Static PSB.

The tasks described in this section are: