Run the Span Accessory

You must run the Span Accessory two times to replicate a database, as follows:

  • First to create a parameter file for the database you specify
  • Second to actually perform the replication

Once the database is replicated, run the Span Accessory to perform the gathering and propagating of updates from the original database.

For subsequent runs of the Span Accessory, you can use the existing Span parameter file for the database you are cloning. In other words, once you run the Span Accessory to create the parameter file, you do not need to create the parameter file again.

To run the Span Accessory:

  1. Run the Span Accessory without a parameter file, but with the name of the database to be replicated.

    START WFL/DATABRIDGE/SPAN ("databasename" ["logicaldatabasename"])




    The title of the DESCRIPTION file without the DESCRIPTION node. The database name can include a usercode and pack, which are used to locate the database DESCRIPTION file, as follows:

    "(usercode)databasename ON packname"

    The quotation marks are required.

    When you enter just a database name, the Span Accessory creates a parameter file named as follows:

    (usercode)DATA/SPAN/databasename/CONTROL ON familyname

    "logicaldata basename"

    An optional name of a logical database when you want to do one of the following:

    • Clone the data sets and data items in the logical database instead of in the original database.
    • Create an alternate parameter file for the physical database, which is useful when you want to generate multiple support libraries for the same database but with different parameter files.

      When you enter a logical database name:

    • The Span Accessory uses DATA/SPAN/dbname/ldbname/CONTROL as the title of the parameter file, if it exists
    • Otherwise, the Span Accessory uses DATA/SPAN/ldbname/CONTROL as it did in previous releases, if it exists
    • Otherwise, if neither file exists, the Span Accessory creates one titled DATA/SPAN/dbname/ldbname/CONTROL

      The logical database name provides a means for having multiple parameter files for the same database. If ldbname is the name of a logical database within the dbname database, the Span Accessory uses that logical database. If not, it uses ldbname to specify an alternate parameter file.

  2. Use CANDE to edit the Span Accessory options in the parameter file the Span Accessory just created. To do so, use the parameter descriptions listed in Span Accessory Parameter File. These parameters determine where output is located, types of formatting and filtering routines to use, etc.
  3. For each data set you want to replicate, replace the comment sign (%) that precedes the replication status information (structure number and state information) with a space. The replication status information looks similar to the following:

    0003 000 0000 0000000000 0000000 00000 00000000000000 0 00000 00000

    If you prefer, you can also uncomment the actual data set name. However, uncommenting the data set name has no effect on replication. You must uncomment the replication status information for the data set to be replicated.

  4. Save the edited the Span Accessory parameter file.
  5. Run the Span Accessory again, this time with the edited parameter file.

    START WFL/DATABRIDGE/SPAN ("databasename", ["logicaldatabasename"])

    where databasename and logicaldatabasename indicate the database names you used in step 1.

    Note: If the message No data set entries in parameter file appears, make sure that you uncommented the replication information for each data set. Although you can uncomment data set names, the Span Accessory reads only the replication information to clone a data set. For an example, see Sample Span Accessory Parameter File.

  6. The Span Accessory creates the output data files for the data sets to be replicated as listed in the parameter file. If the Span Accessory is writing the output data files to disk, skip to step 7.

    If the Span Accessory is writing to tape, dismount the tapes as soon as the Span Accessory closes the output data file destined for that tape.

    For example, the Span Accessory closes an output data file when both of the following conditions occur:

    • The mode (Extract, Fixup, or Update) changes
    • The destination for the new mode is different than that for the old mode
  7. When the Span Accessory is finished, move the output files to the secondary database.
  8. Back up the Span parameter file. This is essential in case you need to reprocess from this point later on.

    For example, you will use these backed up parameter files if you do a rollback. Keep in mind that the audit locations for synchronizing data set updates are written to the parameter file each time you run the Span Accessory.

  9. For the next step, you may want to do one or more of the following: