Setting up the date-time stamp field: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
 
(26 intermediate revisions by 8 users not shown)
Line 2: Line 2:
<p>There are two types of Date Time Stamp fields available under Model 204:</p>
<p>There are two types of Date Time Stamp fields available under Model 204:</p>


<p>One type is to add an [[#Field Design (File Management)#Automatic Fields|automatic field]] to any file or fieldgroup. This type of date time field can have any name, and is purely in the control of the File Manager.</p>
<p>One type is an [[Field design#Automatic fields|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.</p>


<p>The second type provides a more formal approach: the System Manager, in consultation with the File Manager, sets up a date time field which will have the same name in all files (witch has the feature turned on). It is this approach which is discussed here. </p>
<p>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 <var>[[FOPT parameter|FOPT]]</var> X'10' bit. It is this approach that is discussed here. </p>


<p>This topic discusses the set up 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]].</p>
<p>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]].</p>


<p>[[#Field Design (File Management)#Automatic Fields|automatic fields]] has a discussion of the two approaches </p>
==Options to set up the field name==
<p><var class="product">Model&nbsp;204</var> 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 <var>[[DEFINE FILE command|DEFINE]]</var> it to any file. There are two ways to set up the field name:</p>
<ul>
<li>Customize the <code>CUST</code> source code during installation. See your Rocket Model 204 [[Model 204 installation|installation documentation]] for details. </li>
 
<li>Set the <var>[[DTSFN parameter|DTSFN]]</var> parameter on User 0's parameter line.
<p>
The <var>DTSFN</var> 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 <var>DTSFN</var> is a system-level parameter, the date-time stamp is applied at the file level.</p>
</li>
</ul>
<p>
The date-time stamp field name you specify is not edited for validity. The maximum length for a field name is 255 characters.</p>


== Options to set up the field==
<p>Prerequisite:</p>
<p>The name of the date-time stamp field must be set up for the entire system defined before you can [[DEFINE FILE command|DEFINE]] it to any file. There are two ways to set up the field: </p>
<p>During installation, by customizng the CUST source code. See your Rocket <var class="product">Model&nbsp;204</var> Installation Guide for details. </p>
<p><var class="product">Model&nbsp;204</var> is delivered without a default date-time stamp field name. You can define the date-time stamp field name in the CUST source code during installation or on User 0's parameter line by setting the DTSFN parameter.</p>
<p>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 feature is a file-level feature.</p>
<p>The date-time stamp field name you specify is not edited for validity. The maximum length for a field name is 255 characters.</p>
<p>[!!!I need to make sure this is covered in the Installation Guides: </p>
<p>IFAM support for DTS files</p>
<p>Installing DTS support allows an IFAM application to open a DTS file for reading and updating. All update functions are supported.!!!]</p>
==Managing date-time stamp overhead==
==Managing date-time stamp overhead==
<p>Plan to have your hardware, operating systems and <var class="product">Model&nbsp;204</var> 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 <var class="product">Model&nbsp;204</var> field (and index, if the field is indexed) update, including the possibility of the following events:</p>
<p>
Plan to have your hardware, operating systems and <var class="product">Model&nbsp;204</var> 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 <var class="product">Model&nbsp;204</var> field (and index, if the field is indexed) update, including the possibility of the following events:</p>
<ul>
<ul>
<li>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.</li>
<li>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.</li>
 
<li>Adding extension records.</li>
<li>Adding extension records.</li>
<li>Resetting the BRECPPG, BRESERVE and other INDEX-related parameters for participating files.</li>
 
<li>Resetting the BRECPPG, BRESERVE, and other INDEX-related parameters for participating files.</li>
 
<li>Splitting an index.</li>
<li>Splitting an index.</li>
<li>Flushing the journal buffer.</li>
<li>Flushing the journal buffer.</li>
<li>Increased CCAJRNL data set requirements.</li>
<li>Increased CCAJRNL data set requirements.</li>
<li>Increased CHKPOINT data set requirements.</li>
<li>Increased CHKPOINT data set requirements.</li>
<li>Increased Data Base File Size requirements.</li>
<li>Increased Data Base File Size requirements.</li>
<li>Filling CCATEMP.</li>
<li>Filling CCATEMP.</li>
<li>Increased CCATEMP requirements for the:</li>
 
<li>Increased CCATEMP requirements for the:
<ul>
<li>Transaction back out log</li>
<li>Transaction back out log</li>
<li>Constraints database</li>
<li>Constraints database</li>
</ul></li>
<li>Increased CPU, DKPR, DKRD, DKWR, and RQTM, and similar statistic values.</li>
<li>Increased CPU, DKPR, DKRD, DKWR, and RQTM, and similar statistic values.</li>
<li>Server size increase for applications supporting date-time stamp files.</li>
<li>Server size increase for applications supporting date-time stamp files.</li>
<li>Increased server swapping.</li>
<li>Increased server swapping.</li>
<li>Longer time required for update transactions.</li>
<li>Longer time required for update transactions.</li>
</ul>
</ul>
==Enabling date-time stamp updates==
==Enabling date-time stamp updates==
<ol>
<ol>
<li>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.
<li>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 <var>DTSFN</var>.
<p><var class="product">Model&nbsp;204</var> 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:</p>
<p>
<var class="product">Model&nbsp;204</var> 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:</p>
<p class="code">M204.2729: DATE/TIME STAMP FILE, BUT DTSFN UNSPECIFIED FOR RUN
<p class="code">M204.2729: DATE/TIME STAMP FILE, BUT DTSFN UNSPECIFIED FOR RUN
</p>
</p>
<p>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' has been set. </p>
<p>
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. </p>
</li>
</li>
<li>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.</li>
<li>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.</li>
<li>Set FOPT to include X'10' in each date-time stamp file.
<li>Set FOPT to include X'10' in each date-time stamp file.
<p>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:</p>
<p>
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:</p>
<p class="code">M204.2730: DATE/TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE
<p class="code">M204.2730: DATE/TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE
</p></li>
</p></li>
</ol>
</ol>
==Setting the DTSFN parameter==
==Setting the DTSFN parameter==
<p>If you set the DTSFN parameter and then define or redefine a date-time stamp field, <var class="product">Model&nbsp;204</var> will promptly verify invalid attributes.</p>
<p>
<p>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.</p>
If you set the <var>DTSFN</var> parameter and then define or redefine a date-time stamp field, <var class="product">Model&nbsp;204</var> will promptly verify invalid attributes.</p>
<p>
If you have already defined a field as your date-time stamp field prior to setting the <var>DTSFN</var> parameter, the attributes for the date-time stamp field are not verified for validity until DTS processing begins.</p>
 
==Date-time stamp file behavior==
==Date-time stamp file behavior==
<p>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.</p>
<p>
<p>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:</p>
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.</p>
<p class="code">M204.2726: FILE OPTIONS X'10' AND X'02' ARE INCOMPATIBLE
<p>
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:</p>
<p class="code">M204.2725: FILE OPTIONS X'10' AND X'02' ARE INCOMPATIBLE
</p>
</p>
<p>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.</p>
<p>
<p>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</p>
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.</p>
<p>
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: </p>
<p class="code">M204.2730: DATE TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE
<p class="code">M204.2730: DATE TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE
</p>
</p>
<p>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:</p>
<p>
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:</p>
<p class="code">M204.2736: FILE DTSFILE FOPT=X'10' TURNED OFF: DATE/TIME STAMP FIELD UNDEFINED
<p class="code">M204.2736: FILE DTSFILE FOPT=X'10' TURNED OFF: DATE/TIME STAMP FIELD UNDEFINED
</p>
</p>
==Limitations on the date-time stamp feature==
==Limitations on the date-time stamp feature==
<p>The date-time stamp feature does not support:</p>
<p>
The date-time stamp feature does not support:</p>
<ul>
<ul>
<li>Parallel Query Option (PQO/204)</li>
<li>Parallel Query Option (PQO/204)</li>
<li>SQL processing</li>
<li>SQL processing</li>
<li>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.)  
<li>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.)  
<p>With files created in <var class="product">Model&nbsp;204</var> V6R1.0, the file can be opened, but the date-time stamp field will not be updated. </p>
<p>
With files created in <var class="product">Model&nbsp;204</var> V6R1.0, the file can be opened, but the date-time stamp field will not be updated. </p>
</li>
</li>
</ul>
</ul>
===Bidirectional replication===
===Bidirectional replication===
<p>If you plan to use the DTS feature to enable bidirectional replication, note that the date-time stamp feature does not support the following:</p>
<p>
If you plan to use the DTS feature to enable bidirectional replication, note that the date-time stamp feature does not support the following:</p>
<ul>
<ul>
<li>Coordinated recovery</li>
<li>Coordinated recovery</li>
<li>DELETE RECORD and DELETE RECORDS commands
<li>DELETE RECORD and DELETE RECORDS commands
<p>No date-time stamp field update is recorded when another field is physically deleted from the database by a file manager. </p>
<p>
<p>As you delete a field from an individual record, the date-time stamp value is updated.</p>
No date-time stamp field update is recorded when another field is physically deleted from the database by a file manager. </p>
</li>
<p>
As you delete a field from an individual record, the date-time stamp value is updated.</p></li>
 
<li>FILE LOAD and FLOD commands</li>
<li>FILE LOAD and FLOD commands</li>
<li>REDEFINE FIELD and RENAME FIELD commands date-time
<li>REDEFINE FIELD and RENAME FIELD commands date-time
<p>The value of the date-time stamp field is not updated when you redefine a field or rename it.</p>
<p>
</li>
The value of the date-time stamp field is not updated when you redefine a field or rename it.</p></li>
 
<li>RESTORE processing</li>
<li>RESTORE processing</li>
<li>REGENERATE processing</li>
<li>REGENERATE processing</li>
</ul>
</ul>
<p>&nbsp;</p>
 
[[Category:File manager]]
[[Category:Model 204 files]]
[[Category:File management]]
[[Category:System management]]
[[Category:System manager]]
[[Category:Model 204 operational issues]]

Latest revision as of 22:45, 1 February 2016

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