Setting up the date-time stamp field

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

There are two types of Date Time Stamp fields available under Model 204:

One type is an automatic field added to any file or field group. This type of date time field can have any name and is purely in the control of the File Manager.

The second type provides a more formal approach: the System Manager, in consultation with the File Manager, sets up a date time field that has the same name in all files that have the feature turned on using the FOPT X'10' bit. It is this approach that is discussed here.

This topic discusses the setup of the field by the System Manager. For the follow-up actions by the File Manager to actually apply the field to a particular file, see Adding a date-time stamp field.

Options to set up the field name

Model 204 is delivered without a default date-time stamp field name. The name of the date-time stamp field must be set up for the entire system defined before you can DEFINE it to any file. There are two ways to set up the field name:

  • Customize the CUST source code during installation. See your Rocket Model 204 installation documentation for details.
  • Set the DTSFN parameter on User 0's parameter line.

    The DTSFN system parameter specifies the date-time stamp field name. This field name is the same for all files participating in DTS processing in a run. Although DTSFN is a system-level parameter, the date-time stamp is applied at the file level.

The date-time stamp field name you specify is not edited for validity. The maximum length for a field name is 255 characters.

Managing date-time stamp overhead

Plan to have your hardware, operating systems and Model 204 partitions, servers, files, and parameters configured to support the additional overhead required. Putting a date-time stamp on records requires the same system resources as any Model 204 field (and index, if the field is indexed) update, including the possibility of the following events:

  • File Full messages for Tables A, B, and D, as well as C, if using a HASH key for the date-time stamp field, which implies a possible file reorganization.
  • Adding extension records.
  • Resetting the BRECPPG, BRESERVE, and other INDEX-related parameters for participating files.
  • Splitting an index.
  • Flushing the journal buffer.
  • Increased CCAJRNL data set requirements.
  • Increased CHKPOINT data set requirements.
  • Increased Data Base File Size requirements.
  • Filling CCATEMP.
  • Increased CCATEMP requirements for the:
    • Transaction back out log
    • Constraints database
  • Increased CPU, DKPR, DKRD, DKWR, and RQTM, and similar statistic values.
  • Server size increase for applications supporting date-time stamp files.
  • Increased server swapping.
  • Longer time required for update transactions.

Enabling date-time stamp updates

  1. If you did not specify the date-time stamp field name by modifying the CUST source code for installation, you can specify the name by setting the User 0 CCAIN parameter DTSFN.

    Model 204 first checks the DTSFN parameter value, then the CUST module. If you have not specified a value in either place, it is not possible to open an existing date-time stamp file or create a new one. Attempting to do so generates the following error:

    M204.2729: DATE/TIME STAMP FILE, BUT DTSFN UNSPECIFIED FOR RUN

    At CREATE time, the file is not a date-time stamp file. It is not a date-time stamp file until the FOPT X'10' bit is set.

  2. Define the date-time stamp field in each file that you want to have date-time stamp updates. You must open the file with file manager privileges to define the date-time stamp field.
  3. Set FOPT to include X'10' in each date-time stamp file.

    Do this after the date-time stamp field is defined in the file. An FOPT value including X'10' cannot be set on file create. If you attempt to reset the FOPT bit before defining the date-time stamp field, then the following error is issued:

    M204.2730: DATE/TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE

Setting the DTSFN parameter

If you set the DTSFN parameter and then define or redefine a date-time stamp field, Model 204 will promptly verify invalid attributes.

If you have already defined a field as your date-time stamp field prior to setting the DTSFN parameter, the attributes for the date-time stamp field are not verified for validity until DTS processing begins.

Date-time stamp file behavior

A file is identified as being a date-time stamp file by the FOPT value X'10'. When this option is set, any records that are updated in the transaction also have their date-time stamp fields updated as the first step in COMMIT processing.

A file with the FOPT value X'10' must be a Lock Pending Updates (LPU) file. An attempt to set FOPT to include both X'10' and X'02' for a file results in the error:

M204.2725: FILE OPTIONS X'10' AND X'02' ARE INCOMPATIBLE

Date-time stamp field updates are done at COMMIT time, either implicit or explicit. The value in the date-time stamp field is the time that commit processing begins, not the time of the actual commit, which follows the DTS updates. The date-time stamp value is recorded after all updates for the transaction have completed.

The X'10' FOPT value may not be specified as a CREATE parameter, since no date-time stamp fields are defined at that time. Attempting to do so results in the message:

M204.2730: DATE TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE

If you initialize a date-time stamp file and do not specify the KEEPDEFS option, the file will no longer have a date-time stamp field. In this case, date-time stamp processing is disabled and a message issued:

M204.2736: FILE DTSFILE FOPT=X'10' TURNED OFF: DATE/TIME STAMP FIELD UNDEFINED

Limitations on the date-time stamp feature

The date-time stamp feature does not support:

  • Parallel Query Option (PQO/204)
  • SQL processing
  • Files created in V6R1.0 or earlier. An attempt to use the date-time stamp feature with files created by a release prior to V6R1.0 generates an error. (You must re-create the files in V6R1.0 or later.)

    With files created in Model 204 V6R1.0, the file can be opened, but the date-time stamp field will not be updated.

Bidirectional replication

If you plan to use the DTS feature to enable bidirectional replication, note that the date-time stamp feature does not support the following:

  • Coordinated recovery
  • DELETE RECORD and DELETE RECORDS commands

    No date-time stamp field update is recorded when another field is physically deleted from the database by a file manager.

    As you delete a field from an individual record, the date-time stamp value is updated.

  • FILE LOAD and FLOD commands
  • REDEFINE FIELD and RENAME FIELD commands date-time

    The value of the date-time stamp field is not updated when you redefine a field or rename it.

  • RESTORE processing
  • REGENERATE processing