FOPT parameter: Difference between revisions
m (link repair) |
|||
(3 intermediate revisions by 2 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 class="head"><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> | ||
<td>Prohibits statement numbers in procedures.</td></tr> | |||
<tr><th align="right"><var>X'40'</var></th><td>Prohibits statement labels in procedures. </td></tr> | <tr><th align="right"><var>X'40'</var></th> | ||
<td>Prohibits statement labels 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'10'</var></th> | ||
<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 FILEORG parameter contains option 4.</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 | <tr><th align="right"><var>X'02'</var></th> | ||
<td>Disables [[Record_level_locking_and_concurrency_control#Lock_pending_updates|lock pending updates]] — <var class="product">Model 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 | <tr><th align="right"><var> X'01'</var></th> | ||
<tr><th align="right"><var> X'00'</var></th><td>Allows labels and statement numbers in the same file. | <td>Permits only the file manager to define new [[Field names|field names]], not other users.</td></tr> | ||
<p>Enables the Lock Pending Updates feature, which is required for | |||
<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> | ||
< | |||
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.</ | ==Usage notes== | ||
< | <ul> | ||
<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> | |||
<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> | <p> | ||
The enforcement of these options occurs at compile time and is in effect only for procedures compiled from a <var class="product">Model 204</var> file. These options are not enforced if a procedure is compiled as a temporary procedure.</p> | The enforcement of these options occurs at compile time and is in effect only for procedures compiled from a <var class="product">Model 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 204</var> releases. You cannot use the <var>RESET</var> command to set bits that are currently undefined.</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 204</var> releases. You cannot use the <var>RESET</var> command to set bits that are currently undefined.</p></li> | ||
< | |||
If an application makes use of any of the undefined bits of the <var>FOPT</var> parameter, it can produce unexpected results.</ | <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:
Setting | Meaning |
---|---|
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 updates — Model 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.