Creating a keys file

One way to control the database records that are printed is to use a keys file that specifies the root key values of the required database records. The following describes one way you can create the keys file:

  1. Use the Browse function (option 1) to browse the root segments of the database from which you want to print data.

    To get the Browse function to display only the root segments, select New for View usage on the Browse Entry panel and deselect all the dependent segments on the Database Positioning panel.

  2. On the IMS data panel, scroll to the root segment of the first database record that you want printed and issue the XKEY command. FM/IMS creates a sequential keys file with the name
    temphlq.XKEY.Dyymmdd.Thhmmss.dbname

    where:

    • temphlq is the high level qualifier specified on the Set Temporary Data Set Allocation Options panel (option 0.7)
    • yymmdd is the date the data set is created
    • hhmmss is the time that the data set is created
    • dbname is the name of the database that you are browsing
    This file contains the key value of the root segment that you scrolled to and the key values of all the root segments that are after that root segment in the database.
  3. Edit the keys file to remove any root key values for database records that you don't want printed.