DELETE command: Field: Difference between revisions
Jump to navigation
Jump to search
m (Automatically generated page update) |
m (→Large Object data support: typo) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 6: | Line 6: | ||
<dd>Deletes a field from a <var class="product">Model 204</var> file | <dd>Deletes a field from a <var class="product">Model 204</var> file | ||
</dl> | </dl> | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">DELETE FIELD < | <p class="syntax">DELETE FIELD <span class="term">fieldname</span> | ||
</p> | </p> | ||
< | Where <var class="term">fieldname</var> is the name of a field in the currently open <var class="product">Model 204</var> file. | ||
==Example== | ==Example== | ||
<p class="code">DELETE FIELD EMPID | <p class="code">DELETE FIELD EMPID | ||
</p> | </p> | ||
==Usage notes== | ==Usage notes== | ||
< | <ul> | ||
<li>When a field is deleted, <var class="product">Model 204</var> removes the definition of the field and all occurrences of data for that field. | |||
< | <p> | ||
< | Depending on the size of the file and the field type, a <var>DELETE FIELD</var> command might take a long time to complete.</p></li> | ||
<li>You cannot delete record security fields, sort, or hash key fields. If the specified field is in a <var class="product">Model 204</var> file with record security, the file manager must have record security override privileges.</li> | |||
<li>When it processes <var>DELETE FIELD</var>, <var class="product">Model 204</var> ends any update unit in progress and begins a non-backoutable [[File integrity and recovery#Update units and transactions|update unit]]. </li> | |||
<li>As of <var class="product">Model 204</var> V7.5, <var>DELETE FIELD</var> does not allow deletion of fields referred to by an existing [[Field design#CONCATENATION-OF .28CAT.29 attribute|CONCATENATION-OF (CAT)]] or [[Field design#Counting occurrences of a field|COUNT-OCCURRENCES-OF (CTO)]] field. </li> | |||
</ul> | |||
====Handling the date/time stamp field in a file==== | ====Handling the date/time stamp field in a file==== | ||
<p>The DELETE FIELD command is prohibited for the DTSFN field in a file when the FOPT | <p> | ||
The <var>DELETE FIELD</var> command is prohibited for the DTSFN field in a file when the <var>FOPT</var> X'10' bit is set. Attempting to do so results in the following message:</p> | |||
<p class="code">M204.2727: CAN'T DELETE DTS FIELD WHEN FOPT=X'10' IS ON | <p class="code">M204.2727: CAN'T DELETE DTS FIELD WHEN FOPT=X'10' IS ON | ||
</p> | </p> | ||
====Large Object data support==== | ====Large Object data support==== | ||
<p>The DELETE FIELD | <p> | ||
The <var>DELETE FIELD</var> command supports the Large Object data types, so you can delete a Large Object field. However, the space in Table B and Table E is not automatically available for reuse.</p> | |||
====OI CHUNK fields==== | |||
Deleting OI [[DEFINE FIELD command#CHUNK attribute|chunk]] and OI chunk target fields is not allowed. | |||
[[Category: File manager commands]] | [[Category: File manager commands]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 18:33, 1 September 2016
Summary
- Privileges
- File manager
- Function
- Deletes a field from a Model 204 file
Syntax
DELETE FIELD fieldname
Where fieldname is the name of a field in the currently open Model 204 file.
Example
DELETE FIELD EMPID
Usage notes
- When a field is deleted, Model 204 removes the definition of the field and all occurrences of data for that field.
Depending on the size of the file and the field type, a DELETE FIELD command might take a long time to complete.
- You cannot delete record security fields, sort, or hash key fields. If the specified field is in a Model 204 file with record security, the file manager must have record security override privileges.
- When it processes DELETE FIELD, Model 204 ends any update unit in progress and begins a non-backoutable update unit.
- As of Model 204 V7.5, DELETE FIELD does not allow deletion of fields referred to by an existing CONCATENATION-OF (CAT) or COUNT-OCCURRENCES-OF (CTO) field.
Handling the date/time stamp field in a file
The DELETE FIELD command is prohibited for the DTSFN field in a file when the FOPT X'10' bit is set. Attempting to do so results in the following message:
M204.2727: CAN'T DELETE DTS FIELD WHEN FOPT=X'10' IS ON
Large Object data support
The DELETE FIELD command supports the Large Object data types, so you can delete a Large Object field. However, the space in Table B and Table E is not automatically available for reuse.
OI CHUNK fields
Deleting OI chunk and OI chunk target fields is not allowed.