FOPT parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 3 users not shown)
Line 15: Line 15:


==Description==
==Description==
<p>The following table lists the valid settings for file options, which can be summed:</p>
<p>The following table lists the valid settings for file options (<var>FOPT</var>), which can be summed:</p>
<table>
<table>
<tr><th>Setting</th><th>Meaning</th></tr>
<tr class="head"><th>Setting</th><th>Meaning</th></tr>
<tr><th align="right"><var>X'80'</var></th><td>Prohibits statement numbers in procedures.</td></tr>
<tr><th align="right"><var>X'80'</var></th>
<tr><th align="right"><var>X'40'</var></th><td>Prohibits statement labels in procedures. </td></tr>
<td>Prohibits statement numbers in procedures.</td></tr>
<tr><th align="right"><var>X'10'</var></th><td>Enables the date/time stamp feature.</td></tr>
 
<tr><th align="right"><var>X'08'</var></th><td>(Obsolete) Indicates append-first mode in an RDFS file. Without the X'08' option, an RDFS file is in reuse-first mode. The FILEORG parameter contains option 4.</td></tr>
<tr><th align="right"><var>X'40'</var></th>
<tr><th align="right"><var>X'02'</var></th><td>Disables <var>[[Record_level_locking_and_concurrency_control#Lock_pending_updates|lock pending updates]]</var> - <var class="product">Model&nbsp;204</var> automatically disables transaction backout by turning on the X'08' bit of the <var>[[FRCVOPT_parameter|FRCVOPT]]</var> parameter. The X'02' bit of the FOPT parameter and the X'08' bit of the FRCVOPT parameter for a file must be turned off to activate the transaction backout facility.</td></tr>
<td>Prohibits statement labels in procedures. </td></tr>
<tr><th align="right"><var> X'01'</var></th><td>Permits on the file manager to define new <var>[[Field_names|field names]]</var>, not other users.</td></tr>
 
<tr><th align="right"><var> X'00'</var></th><td>Allows labels and statement numbers in the same file.
<tr><th align="right"><var>X'10'</var></th>
<p>Enables the Lock Pending Updates feature, which is required for <var>[[Transaction_back_out|transaction backout (TBO)]]</var>.</p>
<td>Enables the date/time stamp feature.
<p class="note"><b>Note:</b> This option can be set only after the [[Adding_a_date-time_stamp_field|date/time stamp field]] has been defined in the file. You cannot set X'10' when you [[CREATE command: File|create]] the file, because the date/time stamp field has not yet been created. </p>
<p>The X'02' and X'10' options are mutually exclusive.</p></td></tr>
 
<tr><th align="right"><var>X'08'</var></th>
<td>(Obsolete) Indicates append-first mode in an RDFS file. Without the X'08' option, an RDFS file is in reuse-first mode. The <var>FILEORG</var> parameter contains option 4.</td></tr>
 
<tr><th align="right"><var>X'02'</var></th>
<td>Disables [[Record_level_locking_and_concurrency_control#Lock_pending_updates|lock pending updates]] &mdash; <var class="product">Model&nbsp;204</var> automatically disables transaction backout by turning on the X'08' bit of the <var>[[FRCVOPT parameter|FRCVOPT]]</var> parameter. The X'02' bit of the <var>FOPT</var> parameter and the X'08' bit of the <var>FRCVOPT</var> parameter for a file must be turned off to activate the transaction backout facility.
<p>The <var>FOPT</var> X'02' and X'10' options are mutually exclusive.</p></td></tr>
 
<tr><th align="right"><var> X'01'</var></th>
<td>Permits only the file manager to define new [[Field names|field names]], not other users.</td></tr>
 
<tr><th align="right"><var> X'00'</var></th>
<td>Allows labels and statement numbers in the same file.
<p>Enables the Lock Pending Updates feature, which is required for [[Transaction_back_out|transaction backout (TBO)]].</p>
<p>Disables the date/time stamp feature (DTS).</p>
<p>Disables the date/time stamp feature (DTS).</p>
</td></tr>
</td></tr>
</table>
</table>
<p>Options X'80' and X'40' can be used to avoid the mixture of statement numbers and labels in procedures on old files and/or to ensure that any procedure development on new files uses statement labels exclusively.</p>
 
<p>Option X'10' can be set only after the <var>[[Adding_a_date-time_stamp_field|date/time stamp field]]</var> has been defined in the file. You cannot set X'10' when you <var>[[CREATE_command|create]]</var> the file, because the date/time stamp field has not yet been created. The X'02' and X'10' options are mutually exclusive.</p>
==Usage notes==
<p>A file manager can set these file options during file creation or via the <var>[[RESET_command|RESET]]</var> command. Note that the options are file-specific. Thus, if a procedure from one file includes a procedure from another file, the use of labels or numbers within each procedure is governed by the FOPT option assigned to the file where they reside.</p>
<ul>
<p>The enforcement of these options occurs at compile time and is in effect only for procedures compiled from a <var class="product">Model&nbsp;204</var> file. These options are not enforced if a procedure is compiled as a temporary procedure.</p>
<li>Options X'80' and X'40' can be used to avoid the mixture of statement numbers and labels in procedures on old files and/or to ensure that any procedure development on new files uses statement labels exclusively.</li>
<p class="note"><b>Note:</b> When a file is opened, bits that are not currently defined for FOPT are reset. This bit resetting is designed to permit the possible use of these bits by features to be introduced in future <var class="product">Model&nbsp;204</var> releases. You cannot use the RESET command to set bits that are currently undefined by Rocket Software.</p>
 
<p>If an application makes use of any of the undefined bits of the FOPT parameter, it can produce unexpected results.</p>
<li>A file manager can set the <var>FOPT</var> file options during file creation or via the <var>[[RESET_command|RESET]]</var> command. Note that the options are file-specific. Thus, if a procedure from one file includes a procedure from another file, the use of labels or numbers within each procedure is governed by the <var>FOPT</var> option assigned to the file where they reside.
<p>
The enforcement of these options occurs at compile time and is in effect only for procedures compiled from a <var class="product">Model&nbsp;204</var> file. These options are not enforced if a procedure is compiled as a temporary procedure.</p>
<p class="note"><b>Note:</b> When a file is opened, bits that are not currently defined for <var>FOPT</var> are reset. This bit resetting is designed to permit the possible use of these bits by features to be introduced in future <var class="product">Model&nbsp;204</var> releases. You cannot use the <var>RESET</var> command to set bits that are currently undefined.</p></li>
 
<li>If an application makes use of any of the undefined bits of the <var>FOPT</var> parameter, it can produce unexpected results.</li>
</ul>
 
[[Category:CREATE parameters]]
[[Category:CREATE parameters]]
[[Category:File parameters]]
[[Category:File parameters]]
[[Category:Parameters]]
[[Category:Parameters]]

Latest revision as of 14:32, 25 April 2020

File options

Summary

Default value
0
Parameter type
File
Where set
During file creation or reset by file manager
Related products
All
Introduced
Model 204 V2.1 or earlier

Description

The following table lists the valid settings for file options (FOPT), which can be summed:

SettingMeaning
X'80' Prohibits statement numbers in procedures.
X'40' Prohibits statement labels in procedures.
X'10' Enables the date/time stamp feature.

Note: This option can be set only after the date/time stamp field has been defined in the file. You cannot set X'10' when you create the file, because the date/time stamp field has not yet been created.

The X'02' and X'10' options are mutually exclusive.

X'08' (Obsolete) Indicates append-first mode in an RDFS file. Without the X'08' option, an RDFS file is in reuse-first mode. The FILEORG parameter contains option 4.
X'02' Disables lock pending updatesModel 204 automatically disables transaction backout by turning on the X'08' bit of the FRCVOPT parameter. The X'02' bit of the FOPT parameter and the X'08' bit of the FRCVOPT parameter for a file must be turned off to activate the transaction backout facility.

The FOPT X'02' and X'10' options are mutually exclusive.

X'01' Permits only the file manager to define new field names, not other users.
X'00' Allows labels and statement numbers in the same file.

Enables the Lock Pending Updates feature, which is required for transaction backout (TBO).

Disables the date/time stamp feature (DTS).

Usage notes

  • Options X'80' and X'40' can be used to avoid the mixture of statement numbers and labels in procedures on old files and/or to ensure that any procedure development on new files uses statement labels exclusively.
  • A file manager can set the FOPT file options during file creation or via the RESET command. Note that the options are file-specific. Thus, if a procedure from one file includes a procedure from another file, the use of labels or numbers within each procedure is governed by the FOPT option assigned to the file where they reside.

    The enforcement of these options occurs at compile time and is in effect only for procedures compiled from a Model 204 file. These options are not enforced if a procedure is compiled as a temporary procedure.

    Note: When a file is opened, bits that are not currently defined for FOPT are reset. This bit resetting is designed to permit the possible use of these bits by features to be introduced in future Model 204 releases. You cannot use the RESET command to set bits that are currently undefined.

  • If an application makes use of any of the undefined bits of the FOPT parameter, it can produce unexpected results.