DECREASE command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
(16 intermediate revisions by 2 users not shown)
Line 7: Line 7:
</dl>
</dl>
==Syntax==
==Syntax==
<p class="syntax">DECREASE {TABLEB | TABLED | TABLEE | TABLEX} <i>n</i>
<p class="syntax">DECREASE {TABLEB <span class="term">n</span> [DYNAMIC|DYN]} | {TABLED | TABLEE | TABLEX} <span class="term">n</span>  
</p>
</p>
   
   
<b>Where:</b>
<p><b>Where:</b></p>
n is the number of pages in the specified file table to be reassigned to free space. You can free only pages that are not currently in use. The legal value for n depends upon the settings of the file parameters, as follows:  
<ul>
<li><var class="term">n</var> is the number of pages in the specified file table to be reassigned to free space. You can free only pages that are not currently in use. The legal value for <var class="term">n</var> depends upon the settings of the file parameters, as follows:  
<ul>  
<ul>  
<li>
<li>
<p>If TABLEB is specified, <i>n</i> must be in the range 1 through (BSIZE - BHIGHPG - 1).</p>
<p>If TABLEB is specified, <var class="term">n</var> must be in the range 1 through (<var>[[BSIZE_parameter|BSIZE]]</var> - <var>[[BHIGHPG_parameter|BHIGHPG]]</var> - 1).</p>
<p>If a Table B base record, which has one and only one extension record elsewhere in the file, resides on a Table B page with sufficient free space, then the data compactor will recombine the fields in the extension record with the base record and delete the extension. The compactor will continue to recombine multiple extension records into fewer extensions, but will not attempt to recombine those with the base record.</p>
</li>
</li>
   
   
<li>
<li>
<p>If TABLED is specified, n must be in the range 1 through the value of DSIZE less the value of DHIGHPG. (See "Usage notes" below.) </p>
<p>If TABLED is specified, <var class="term">n</var> must be in the range 1 through the value of <var>[[DSIZE_parameter|DSIZE]]</var> less the value of <var>[[DHIGHPG_parameter|DHIGHPG]]</var>. (See "Usage notes" below.) </p>
</li>
</li>
   
   
<li>
<li>
<p>If TABLEE is specified, n must be in the range 1 through (ESIZE - EHIGHPG -1). Additionally, you cannot decrease the size of Table E below 20 pages; thus (ESIZE - n must be greater than or equal to 20.</p>
<p>If TABLEE is specified, <var class="term">n</var> must be in the range 1 through (<var>[[ESIZE_parameter|ESIZE]]</var> - <var>[[EHIGHPG_parameter|EHIGHPG]]</var> -1). Additionally, you cannot decrease the size of Table E below 20 pages; thus (ESIZE - <var class="term">n</var>) must be greater than or equal to 20.</p>
</li>
</li>
   
   
<li>
<li>
<p>If TABLEX is specified, n must be in the range 1 through (XSIZE - XHIGHPG -1). </p>
<p>If TABLEX is specified, <var class="term">n</var> must be in the range 1 through (<var>[[XSIZE_parameter|XSIZE]]</var> - <var>[[XHIGHPG_parameter|XHIGHPG]]</var> -1). </p>
</li>
</li>
  </ul>
  </ul>
==Example==
</li>
<li><p><var>DYNAMIC</var> or <var>DYN</var> specifies that Table B is to be decreased even if the file is open and has requests compiled against it.</p>
</li>
</ul>
 
==Examples==
DECREASE TABLED 14
DECREASE TABLED 14
DECREASE TABLEB 500 DYN
==Usage notes==
==Usage notes==
<p>The DECREASE command allows the file manager to conserve file space by deallocating a certain portion of a <var class="product">Model&nbsp;204</var> file. Unused pages in Table B (except for hash key files) and Table D can be reassigned to free space. The sizes of Tables A and C cannot be changed without recreating the file and reloading all of the data.</p>
<p>The DECREASE command allows the file manager to conserve file space by deallocating a certain portion of a <var class="product">Model&nbsp;204</var> file. Unused pages in [[Table_B_(File_architecture)|Table B]] (except for [[Hash_key_files|hash key files]]) and [[Table_D_(File_architecture)|Table D]] can be reassigned to free space. The sizes of [[Table_A_(File_architecture)|Tables A]] and C cannot be changed without recreating the file and reloading all of the data.</p>
<p>The DECREASE command can be issued only in file context, that is, the current default must be a file, not a group.</p>
<p>The DECREASE command can be issued only in file context, that is, the current default must be a file, not a group.</p>
<p>Increasing and decreasing file sizes, the various tables that make up a file, and the relevant table parameters are discussed in detail in the <var class="book">Model&nbsp;204 File Manager's Guide</var>.</p>
<p>When it processes a DECREASE command, <var class="product">Model&nbsp;204</var> ends any update unit in progress and begins a [[File_integrity_and_recovery#Model_204_update_units|non-backoutable update unit]]. </p>
<p>When it processes a DECREASE command, <var class="product">Model&nbsp;204</var> ends any update unit in progress and begins a non-backoutable update unit. For more information about <var class="product">Model&nbsp;204</var> update units, see the <var class="book">Model&nbsp;204 File Manager's Guide</var>.</p>
<p>To use the DECREASE command you must have update authority to the selected file. If the file is open for read-only access, the DECREASE command is rejected with the following message: </p>
<p>To use the DECREASE command you must have update authority to the selected file. If the file is open for read-only access, the DECREASE command is rejected with the following message: </p>
<p class="code">M204.1036: UPDATES NOT PERMITTED.
<p class="code">M204.1036: UPDATES NOT PERMITTED.
</p>
</p>
==See also==
Further information about the use of <var>DECREASE</var> can be found in the [[Managing file and table sizes]] article.
[[Category: File manager commands]]
[[Category: File manager commands]]
[[Category:Commands]]
[[Category:Commands]]

Latest revision as of 16:00, 11 February 2019

Summary

Privileges
File manager
Function
Decreases the size of a Model 204 file by deallocating a portion of the file space

Syntax

DECREASE {TABLEB n [DYNAMIC|DYN]} | {TABLED | TABLEE | TABLEX} n

Where:

  • n is the number of pages in the specified file table to be reassigned to free space. You can free only pages that are not currently in use. The legal value for n depends upon the settings of the file parameters, as follows:
    • If TABLEB is specified, n must be in the range 1 through (BSIZE - BHIGHPG - 1).

    • If TABLED is specified, n must be in the range 1 through the value of DSIZE less the value of DHIGHPG. (See "Usage notes" below.)

    • If TABLEE is specified, n must be in the range 1 through (ESIZE - EHIGHPG -1). Additionally, you cannot decrease the size of Table E below 20 pages; thus (ESIZE - n) must be greater than or equal to 20.

    • If TABLEX is specified, n must be in the range 1 through (XSIZE - XHIGHPG -1).

  • DYNAMIC or DYN specifies that Table B is to be decreased even if the file is open and has requests compiled against it.

Examples

DECREASE TABLED 14

DECREASE TABLEB 500 DYN

Usage notes

The DECREASE command allows the file manager to conserve file space by deallocating a certain portion of a Model 204 file. Unused pages in Table B (except for hash key files) and Table D can be reassigned to free space. The sizes of Tables A and C cannot be changed without recreating the file and reloading all of the data.

The DECREASE command can be issued only in file context, that is, the current default must be a file, not a group.

When it processes a DECREASE command, Model 204 ends any update unit in progress and begins a non-backoutable update unit.

To use the DECREASE command you must have update authority to the selected file. If the file is open for read-only access, the DECREASE command is rejected with the following message:

M204.1036: UPDATES NOT PERMITTED.

See also

Further information about the use of DECREASE can be found in the Managing file and table sizes article.