Run the Span Accessory

You must run Span twice 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 Span to perform the gathering and propagating of updates from the original database.

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

To run Span:

  1. Run Span 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, Span creates a parameter file named as follows:

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


    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 physical 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:

    • Span uses DATA/SPAN/dbname/ldbname/CONTROL as the title of the parameter file, if it exists
    • Otherwise, Span uses DATA/SPAN/ldbname/CONTROL as it did in previous releases, if it exists
    • Otherwise, if neither file exists, Span 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, Span uses that logical database. If not, it uses ldbname to specify an alternate parameter file.

  2. Use CANDE to edit the Span options in the parameter file that Span just created. To do so, use the parameter descriptions listed in Span 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 parameter file.
  5. Run Span 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, Span reads only the replication information to clone a data set. For an example, see Sample Span Parameter File.

  6. While Span is running, you can view the number of records it has replicated by using the AX STATUS command. Span creates the output data files for the data sets that are to be replicated as listed in the parameter file. If Span is writing the output data files to disk, skip to step 8.

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

    For example, Span 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 Span is finished, move the output files to the secondary database.
  8. Back up the Span parameter file. This is essential if you need to reprocess from this point later. For example, if you do a rollback, you will use these parameter files. Keep in mind that the audit locations for synchronizing data set updates are written to the parameter file each time you run Span.
  9. For the next step, you may want to do one or more of the following: