Managing file and table sizes: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (misc cleanup)
 
(One intermediate revision by one other user not shown)
Line 71: Line 71:
   
   
====Usage notes====
====Usage notes====
<p>
<ul>
Executing the command immediately changes the values of <var>FREESIZE</var> and one of <var>BSIZE</var>, <var>DSIZE</var>, <var>ESIZE</var> or <var>XSIZE</var>, respectively. </p>
<li>Executing the command immediately changes the values of <var>FREESIZE</var> and one of <var>BSIZE</var>, <var>DSIZE</var>, <var>ESIZE</var>, or <var>XSIZE</var>, respectively. </li>
<p>
 
The <var>DYNAMIC</var> option applies to only an <var>INCREASE TABLEB</var> command.</p>
<li>The <var>DYNAMIC</var> option applies only to an <var>INCREASE TABLEB</var> command, and it is subject to this limitation: you cannot increase <var>BSIZE</var> to a value that would increase the number of segments in the file. To overcome this limitation, see [[#MAXINCBP parameter|MAXINCBP parameter]], below.</li>
<p>
 
For Tables B and X, you must take into account <var>[[BRECPPG parameter|BRECPPG]]</var> and the maximum number of slots.</p>
<li>For Tables B and X, you must take into account <var>[[BRECPPG parameter|BRECPPG]]</var> and the maximum number of slots.</li>
</ul>
   
   
===Increasing Table B without exclusive access ===
===Increasing Table B without exclusive access ===
Line 90: Line 91:
Even with the <var>DYNAMIC</var> option, you can only increase the size to the next segment boundary. (The number of segments in a file is used as part of the procedure compilation.) This limitation can be alleviated by setting the <var>[[MAXINCBP parameter|MAXINCBP]]</var> parameter. </p>
Even with the <var>DYNAMIC</var> option, you can only increase the size to the next segment boundary. (The number of segments in a file is used as part of the procedure compilation.) This limitation can be alleviated by setting the <var>[[MAXINCBP parameter|MAXINCBP]]</var> parameter. </p>
<p>
<p>
The <var>MAXINCBP</var> system parameter sets a limit, as a percentage of <var>BSIZE</var>, on how much Table B can be increased, by the INCREASE TABLE B command or by automatic increase (if <var>BAUTOINC</var> is also set). This percentage is then used to calculate the maximum number of segments, rounded up to a whole number, that the file could have if Table B were increased by the entire amount. The actual number of pages that <var>BSIZE</var> can increase to is determined by the calculated number of segments, divided by <var>BRECPPG</var>.</p>
The <var>MAXINCBP</var> system parameter sets a limit, as a percentage of <var>BSIZE</var>, on how much Table B can be increased by the <var>INCREASE TABLE B</var> command or by automatic increase (if <var>BAUTOINC</var> is also set). This percentage is then used to calculate the maximum number of segments, rounded up to a whole number, that the file could have if Table B were increased by the entire amount. The actual number of pages that <var>BSIZE</var> can increase to is determined by the calculated number of segments, divided by <var>BRECPPG</var>.</p>
<p>
<p>
The compiler uses the maximum possible number of segments to determine the correct length of the entries it allocates in the resource locking table and in VTBL. During compilation the file is treated as though it has already been increased to the maximum number of segments (<var>MAXINCBP</var>) even though no increase may yet have occurred.</p>
The compiler uses the maximum possible number of segments to determine the correct length of the entries it allocates in the resource locking table and in VTBL. During compilation the file is treated as though it has already been increased to the maximum number of segments (<var>MAXINCBP</var>) even though no increase may yet have occurred.</p>
Line 100: Line 101:
====Example of Table B increase====
====Example of Table B increase====
<p>
<p>
For example, consider a file with BSIZE=100000, BRECPPG=10. For purposes of allocating entries in the record locking table and VTBL, the compiler treats this file as though all records are present, and it is therefore a 21-segment ((10*100000)/49152) file. However, if the parameter <var>MAXINCBP</var> is 20, then Table B in this file could increase by 20,000 pages. The resulting Table B of 120,000 pages would be 24.4-segment ((120000*10)/49152) segment file. This would be rounded up to 25 segments, so <var>BSIZE</var> could actually be increased to 122,880 before crossing into the twenty-sixth segment.</p>
For example, consider a file with <code>BSIZE=100000</code>, <code>BRECPPG=10</code>. For purposes of allocating entries in the record locking table and VTBL, the compiler treats this file as though all records are present, and it is therefore a 21-segment (<code>(10*100000)/49152</code>) file. </p>
<p>
However, if the parameter <var>MAXINCBP</var> is 20, then Table B in this file could increase by 20,000 pages. The resulting Table B of 120,000 pages would be 24.4-segment (<code>(120000*10)/49152</code>) segment file. This would be rounded up to 25 segments, so <var>BSIZE</var> could actually be increased to 122,880 before crossing into the twenty-sixth segment.</p>
<p>
<p>
These calculations occur when each file is opened for the first time, and they affect the compilation of requests from that time forward, for that run.</p>
These calculations occur when each file is opened for the first time, and they affect the compilation of requests from that time forward, for that run.</p>
Line 111: Line 114:
<p>
<p>
Free space will be decreased by increasing Table(s) B, D, and/or E.</p>
Free space will be decreased by increasing Table(s) B, D, and/or E.</p>
If you wish to make the overall size of the file smaller because there is too much free space, you can use the [[ File dumping and restoring|DUMP and RESTORE commands]] to decrease the size or number of datasets.
If you wish to make the overall size of the file smaller because there is too much free space, you can use the [[ File dumping and restoring|DUMP and RESTORE commands]] to decrease the size or number of data sets.
   
   
==Decreasing Tables B, D, or E==
==Decreasing Tables B, D, or E==
Line 123: Line 126:
</p>
</p>
<p>
<p>
where:</p>
Where:</p>
<p>
<p>
<var class="term">n</var> is a decimal number. </p>
<var class="term">n</var> is a decimal number. </p>
Line 141: Line 144:
==Space management==
==Space management==
<p>
<p>
The number of pages in a <var class="product">Model&nbsp;204</var> table can be increased using the INCREASE TABLEB, INCREASE TABLED, or INCREASE TABLEE commands. If there are insufficient pages in FREESIZE to accommodate the increase, new pages can be added, also dynamically, to FREESIZE using the INCREASE DATASETS command. </p>
The number of pages in a <var class="product">Model&nbsp;204</var> table can be increased using the <var>INCREASE TABLEB</var>, <var>INCREASE TABLED</var>, or <var>INCREASE TABLEE</var> commands. If there are insufficient pages in <var>FREESIZE</var> to accommodate the increase, new pages can be added, also dynamically, to <var>FREESIZE</var> using the <var>INCREASE DATASETS</var> command. </p>
<p>
<p>
When data growth can be anticipated, these increases can be made in advance and file availability remains unaffected. However, these increases are not automatic. You must anticipate the increase required and issue the commands manually prior to running update transactions that require the additional pages. </p>
When data growth can be anticipated, these increases can be made in advance and file availability remains unaffected. However, these increases are not automatic. You must anticipate the increase required and issue the commands manually prior to running update transactions that require the additional pages. </p>
Line 160: Line 163:
===Adding new pages with the INCREASE DATASETS command===
===Adding new pages with the INCREASE DATASETS command===
<p>
<p>
When free space is exhausted, you can manually add new pages dynamically with the INCREASE DATASETS command. </p>
When free space is exhausted, you can manually add new pages dynamically with the <var>INCREASE DATASETS</var> command. </p>
<ul>
<ul>
<li>First, allocate a new data set, perhaps using the ALLOCATE command as follows:
<li>First, allocate a new data set, perhaps using the <var>ALLOCATE</var> command as follows:
<p class="code">ALLOCATE YOURF2 WITH SCOPE=SYSTEM SEQUENTIAL CATALOG -
<p class="code">ALLOCATE YOURF2 WITH SCOPE=SYSTEM SEQUENTIAL CATALOG -
     VOLUME=CCAVOL  UNIT=3390 PRI 10 CYL BLKSIZE=6184 -
     VOLUME=CCAVOL  UNIT=3390 PRI 10 CYL BLKSIZE=6184 -
Line 185: Line 188:
</p>
</p>
<p>
<p>
The lettered blocks in [[#Adding new pages with the INCREASE DATASETS command|Adding new pages with the INCREASE DATASETS command]] and [[#Adding new pages with the INCREASE DATASETS command|Adding new pages with the INCREASE DATASETS command]] represent pages for Tables A, B, C, D, and E; the F blocks represent free pages (or FREESIZE). Now you have added all of the pages in YOURF2 to FREESIZE in YOURFILE.</p>
The lettered blocks in the following figures represent pages for Tables A, B, C, D, and E; the F blocks represent free pages (or <var>FREESIZE</var>). Now you have added all of the pages in <code>YOURF2</code> to <var>FREESIZE</var> in <code>YOURFILE</code>.</p>
<table>
<table>
<caption>YOURFILE</caption>
<caption>YOURFILE</caption>
Line 347: Line 350:
INCREASE DATASETS WITH CARS3
INCREASE DATASETS WITH CARS3
EOJ
EOJ
</p>  
</p>
 
==Automatic increases==
==Automatic increases==
Perhaps the worst thing that can happen to a File Manager are system outages due to tables within files becoming full during processing. To prevent tables from becoming full, some of the functions described above can be automated so that table sizes are changed as needed.
Perhaps the worst thing that can happen to a File Manager is a system outage due to tables within files becoming full during processing. To prevent tables from becoming full, some of the functions described above can be automated so that table sizes are changed as needed.


===Increasing page size automatically for Tables B, D, and X===
===Increasing page size automatically for Tables B, D, and X===
<p>
<p>
The automatic increase option for Tables B, D, and X lets table increases occur without manual intervention. If a file has been created with this capability, an automatic increase will occur when the table becomes full due to lack of allocated pages in one or more of Tables B, D, and X.</p>
The automatic increase option for Tables B, D, and X lets table increases occur without manual intervention. If a file is created with this capability, an automatic increase will occur when the table becomes full due to a lack of allocated pages in one or more of Tables B, D, and X.</p>
<p>
<p>
Large transaction volumes or significant data growth can increase page requirements beyond what is currently allocated to the file tables. When this occurs, files are marked full, requests are cancelled, and transactions are backed out. Consequently, files may be left unusable for update processing and applications until there can be manual intervention to increase the table size.</p>
Large transaction volumes or significant data growth can increase page requirements beyond what is currently allocated to the file tables. When this occurs, files are marked full, requests are cancelled, and transactions are backed out. Consequently, files might be left unusable for update processing and applications until there can be manual intervention to increase the table size.</p>
<p>
<p>
Implementation of automatic increase capabilities in your files can reduce request cancellations and transaction back outs due to table full conditions. This feature expands the ability to provide 24/7 file and application availability.</p>
Implementing automatic increases in your files can reduce request cancellations and transaction back outs due to table full conditions. This feature expands the ability to provide 24/7 file and application availability.</p>
<p>
<p>
The page increase is based on the values of the controlling parameters that are set by the file manager or system defaults that can be set by a system manager. </p>
The page increase is based on the values of the controlling parameters that are set by the file manager or by system defaults that can be set by a system manager. </p>
<ul>
<ul>
<li>For files created prior to V6R1 the system parameters, if set, will be used to increase supported tables that fill. </li>
<li>For files created prior to V6R1, the system parameters, if set, are used to increase supported tables that fill. </li>


<li>For files created at V6R1 or later the file and system parameters, if set, will be used for automatic increase operations. </li>
<li>For files created under V6R1 or later, the file and system parameters, if set, are used for automatic increase operations. </li>
</ul>
</ul>
<p>
<p>
If the file parameters are not set, but the system parameters are set, they will be used. If both file and system parameters are set, the file parameters take precedence. If none of the automatic increase parameters are set, no automatic increases can occur. </p>
If the file parameters are not set, but the system parameters are set, the system parameters are used. If both file and system parameters are set, the file parameters take precedence. If none of the automatic increase parameters are set, no automatic increases can occur. </p>


===How automatic increase operates===
===How automatic increase operates===
Line 386: Line 389:
===Enabling automatic increase===
===Enabling automatic increase===
<p>
<p>
To use automatic increase, the files must be created under V6R1 or later. The file and system parameters that control automatic increase are: <var>[[BAUTOINC parameter|BAUTOINC]]</var>, <var>[[DAUTOINC parameter|DAUTOINC]]</var>, <var>[[XAUTOINC parameter|XAUTOINC]]</var>, and <var>[[DEFINCP parameter|DEFINCP]]</var>. </p>
To use automatic increase, the files must be created under V6R1 or later. </p>
<p>
The file and system parameters that control automatic increase are: <var>[[BAUTOINC parameter|BAUTOINC]]</var>, <var>[[DAUTOINC parameter|DAUTOINC]]</var>, <var>[[XAUTOINC parameter|XAUTOINC]]</var>, and <var>[[DEFINCP parameter|DEFINCP]]</var>. </p>
<p>
<p>
To implement automatic increase capabilities for files created prior to V6R1, you must reorganize the files under a supporting <var class="product">Model&nbsp;204</var> release.</p>
To implement automatic increase capabilities for files created prior to V6R1, you must reorganize the files under a supporting <var class="product">Model&nbsp;204</var> release.</p>
Line 397: Line 402:
   
   
===MAXINCBP  with Table B automatic increase ===
===MAXINCBP  with Table B automatic increase ===
The <var>MAXINCBP</var> parameter works for Table B automatic increase the same way as for manual increases (described above).
The <var>MAXINCBP</var> parameter works for Table B automatic increases the same way it does for manual increases ([[#MAXINCBP parameter|described above]]). It sets a limit, as a percentage of <var>BSIZE</var>, on how much Table B can be auto-increased, if <var>BAUTOINC</var> is also set.
<var>MAXINCBP</var> sets a limit, as a percentage of <var>BSIZE</var>, on how much Table B can auto-increase by if <var>BAUTOINC</var> is also set.
   
   
===When an automatic increase takes place===
===When an automatic increase takes place===
<p>
<p>
If <var>[[FREESIZE parameter|FREESIZE]]</var> is 0, or all automatic increase parameter values are 0, no automatic increase can occur, and the default processing for a table full condition results.</p>
If <var>[[FREESIZE parameter|FREESIZE]]</var> is 0, or all automatic-increase parameter values are 0, no automatic increase can occur, and the default processing for a table full condition results.</p>
<p>
<p>
When a file is opened, no automatic increase occurs for any table. This avoids increasing a file at open time that may have problems with recovery. The <var>DEFINCP</var> parameter can be set with a default percentage increase for Tables B, D, and X, and the table lacking space is increased dynamically. If a table becomes full, <var class="product">Model&nbsp;204</var> checks the corresponding automatic increase value &mdash; <var>BAUTOINC</var>, <var>DAUTOINC</var>, or <var>XAUTOINC</var>. If it is zero, <var>DEFINCP</var> is checked. If it is not zero, the table is increased by <var>DEFINCP</var> percent. </p>
If a file is opened, no automatic increase occurs for any table. This avoids increasing a file at open time that may have problems with recovery. The <var>DEFINCP</var> parameter can be set with a default percentage increase for Tables B, D, and X, and the table that is lacking space is increased dynamically. If a table becomes full, <var class="product">Model&nbsp;204</var> checks the corresponding automatic increase value &mdash; <var>BAUTOINC</var>, <var>DAUTOINC</var>, or <var>XAUTOINC</var>. If it is zero, <var>DEFINCP</var> is checked. If it is not zero, the table is increased by <var>DEFINCP</var> percent. </p>
   
   
==Parameters that affect table size==
==Parameters that affect table size==
<p>
<p>
The following file, system, and table parameters are relevant to the <var>INCREASE</var> and <var>DECREASE</var> commands and the Automatic Increase feature. They enable you to determine space usage and space availability in Tables B, D, and X. </p>
The following file, system, and table parameters are relevant to the <var>INCREASE</var> and <var>DECREASE</var> commands and the automatic increase feature. They let you determine space usage and space availability in Tables B, D, and X. </p>
<table class="thJustBold">
<table class="thJustBold">
<tr class="head">
<tr class="head">
Line 420: Line 423:
<th>BAUTOINC</th>
<th>BAUTOINC</th>
<td>FILE</td>
<td>FILE</td>
<td>Number of pages for Table B automatic increase</td>
<td>Number of pages for Table B automatic increase.</td>
</tr>
</tr>
   
   
Line 426: Line 429:
<th>BHIGHPG</th>
<th>BHIGHPG</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Highest active Table B page number. Because page numbers start at zero, the number of Table B pages concurrently in use is equal to (BHIGHPG + 1).  </td>
<td>Highest active Table B page number. Because page numbers start at zero, the number of Table B pages concurrently in use is equal to <code>BHIGHPG+1</code>.  </td>
</tr>
</tr>
   
   
Line 432: Line 435:
<th>BRLIMSZ</th>
<th>BRLIMSZ</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Table B base record limit size</td>
<td>Table B base record limit size.</td>
</tr>
</tr>
   
   
Line 438: Line 441:
<th>BSIZE</th>
<th>BSIZE</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Current number of pages assigned to Table B   </td>
<td>Current number of pages assigned to Table B. </td>
</tr>
</tr>
   
   
Line 444: Line 447:
<th>DAUTOINC</th>
<th>DAUTOINC</th>
<td>FILE</td>
<td>FILE</td>
<td>Number of pages for Table d automatic increase</td>
<td>Number of pages for Table d automatic increase.</td>
</tr>
</tr>
   
   
Line 450: Line 453:
<th>DEFINCP</th>
<th>DEFINCP</th>
<td>SYSTEM</td>
<td>SYSTEM</td>
<td>Default automatic table size percentage increase</td>
<td>Default automatic table size percentage increase.</td>
</tr>
</tr>
   
   
Line 456: Line 459:
<th>DHIGHPG</th>
<th>DHIGHPG</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Highest Table D page number that has been used (the Table D highwater mark for the file) </td>
<td>Highest Table D page number that has been used (the Table D highwater mark for the file). </td>
</tr>
</tr>
   
   
Line 462: Line 465:
<th>DPGSUSED</th>
<th>DPGSUSED</th>
<td>FILE</td>
<td>FILE</td>
<td>Number of Table D pages in use</td>
<td>Number of Table D pages in use.</td>
</tr>
</tr>
   
   
Line 468: Line 471:
<th>DSIZE</th>
<th>DSIZE</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Current number of pages assigned to Table D </td>
<td>Current number of pages assigned to Table D. </td>
</tr>
</tr>
   
   
Line 474: Line 477:
<th>EHIGHPG</th>
<th>EHIGHPG</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Highest active Table E page number that has been used-the Table E highwater mark for the file</td>
<td>Highest active Table E page number that has been used &mdash; the Table E highwater mark for the file.</td>
</tr>
</tr>
   
   
Line 480: Line 483:
<th>EPGSUSED</th>
<th>EPGSUSED</th>
<td>FILE</td>
<td>FILE</td>
<td>Number of Table E pages in use</td>
<td>Number of Table E pages in use.</td>
</tr>
</tr>
   
   
Line 486: Line 489:
<th>ESIZE</th>
<th>ESIZE</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Current number of pages assigned to Table E</td>
<td>Current number of pages assigned to Table E.</td>
</tr>
</tr>
   
   
Line 492: Line 495:
<th>FREESIZE</th>
<th>FREESIZE</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Current number of pages of free space (that is, unassigned pages) </td>
<td>Current number of pages of free space (that is, unassigned pages). </td>
</tr>
</tr>
   
   
Line 498: Line 501:
<th>MAXINCBP</th>
<th>MAXINCBP</th>
<td>SYSTEM</td>
<td>SYSTEM</td>
<td>Maximum dynamic Table B percentage increase</td>
<td>Maximum dynamic Table B percentage increase.</td>
</tr>
</tr>
   
   
Line 504: Line 507:
<th>RECRDOPT</th>
<th>RECRDOPT</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Record options</td>
<td>Record options.</td>
</tr>
</tr>
   
   
Line 510: Line 513:
<th>XAUTOINC</th>
<th>XAUTOINC</th>
<td>FILE</td>
<td>FILE</td>
<td>Number of pages for Table X automatic increase</td>
<td>Number of pages for Table X automatic increase.</td>
</tr>
</tr>
   
   
Line 516: Line 519:
<th>XHIGHPG</th>
<th>XHIGHPG</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Table X highest active page</td>
<td>Table X highest active page.</td>
</tr>
</tr>
   
   
Line 522: Line 525:
<th>XSIZE</th>
<th>XSIZE</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Pages in Table X</td>
<td>Pages in Table X.</td>
</tr>
</tr>
</table>
</table>

Latest revision as of 21:40, 21 March 2017

When you create a file and its tables, whether you use the calculations described in File sizing introduction to size the tables or the rules of thumb that an experienced File Manager develops over time, there is always some space for growth included. When a Model 204 file is created, exact disk space requirements are seldom known. Even if perfect, eventually, it will be necessary to revise the space utilized in a file.

There are three ways to maintain table sizes:

  • Using the FILEMGMT subsystem
  • (The File Manager) using a number of commands to maintain the table sizes
  • Automating some of the functions in the preceding item by setting up the "Auto Increase" parameters in the file to add free space to the tables as needed

The latter two are described below.

Overview of capabilities

Because of the hashed nature of Tables A and C, these tables can only be changed with the CREATE command during a file reorganization.

The other tables may be modified using the INCREASE and DECREASE commands, as follows:

Command Description Exclusive Access? Limitations
INCREASE TABLEB Move pages from free space to Table B. No, but the DYNAMIC sub-parameter is required if you don't have exclusive access. Segment boundaries need to be taken into account.

The MAXINCBP parameter needs to be set if you want to increase Table B beyond the current segment boundary.

INCREASE cannot be used for Table B in a hashed organization file (FILEORG = X'08').

INCREASE TABLED
INCREASE TABLEE or
INCREASE TABLEX
Move pages from free space to this table. No. Up to maximum table size.

XSIZE cannot be increased from 0.

DECREASE TABLEB
DECREASE TABLED
DECREASE TABLEE
or
DECREASE TABLEX
Move pages to free space from the respective table. Yes. Only if the xHIGHPG (x for the respective table) statistic permits. it
INCREASE DATASET Add an additional dataset to a Model 204 file. No. A model 204 file may have up to 255 datasets.

The additional pages are formatted as free space.

Increasing Tables B, D, E, and X

You can increase manually Tables B, D, E, and X by assigning pages from free space (with special considerations for Table B described below). Therefore, you must examine the FREESIZE parameter using the VIEW command to make sure that unassigned pages are available. If they are not, you can use INCREASE DATASETS to add new pages.

The INCREASE command

Syntax

The format of the INCREASE command is:

INCREASE {TABLEB | TABLED | TABLEE | TABLEX} n [DYNAMIC]

Where:

n is a decimal number from 1 to FREESIZE.

Example

INCREASE TABLEE 2

Usage notes

  • Executing the command immediately changes the values of FREESIZE and one of BSIZE, DSIZE, ESIZE, or XSIZE, respectively.
  • The DYNAMIC option applies only to an INCREASE TABLEB command, and it is subject to this limitation: you cannot increase BSIZE to a value that would increase the number of segments in the file. To overcome this limitation, see MAXINCBP parameter, below.
  • For Tables B and X, you must take into account BRECPPG and the maximum number of slots.

Increasing Table B without exclusive access

The DYNAMIC option

If you do not have exclusive access to the file and still need to increase the size of Table B, you must specify DYNAMIC (or DYN) on the INCREASE TABLEB command to force the increase to occur (even though requests have already been compiled against the file). The command would look something like:

INCREASE TABLEB 10000 DYNAMIC

MAXINCBP parameter

Even with the DYNAMIC option, you can only increase the size to the next segment boundary. (The number of segments in a file is used as part of the procedure compilation.) This limitation can be alleviated by setting the MAXINCBP parameter.

The MAXINCBP system parameter sets a limit, as a percentage of BSIZE, on how much Table B can be increased by the INCREASE TABLE B command or by automatic increase (if BAUTOINC is also set). This percentage is then used to calculate the maximum number of segments, rounded up to a whole number, that the file could have if Table B were increased by the entire amount. The actual number of pages that BSIZE can increase to is determined by the calculated number of segments, divided by BRECPPG.

The compiler uses the maximum possible number of segments to determine the correct length of the entries it allocates in the resource locking table and in VTBL. During compilation the file is treated as though it has already been increased to the maximum number of segments (MAXINCBP) even though no increase may yet have occurred.

The total Table B expansion with no MAXINCBP is limited to the existing number of segments. If a file is opened without MAXINCBP set yet, then no increase in the number of segments is possible. MAXINCBP must be set (or reset) before the file is opened.

The MAXINCBP parameter is ignored for any sorted or hash key files.

Example of Table B increase

For example, consider a file with BSIZE=100000, BRECPPG=10. For purposes of allocating entries in the record locking table and VTBL, the compiler treats this file as though all records are present, and it is therefore a 21-segment ((10*100000)/49152) file.

However, if the parameter MAXINCBP is 20, then Table B in this file could increase by 20,000 pages. The resulting Table B of 120,000 pages would be 24.4-segment ((120000*10)/49152) segment file. This would be rounded up to 25 segments, so BSIZE could actually be increased to 122,880 before crossing into the twenty-sixth segment.

These calculations occur when each file is opened for the first time, and they affect the compilation of requests from that time forward, for that run.

Increasing LRETBL to accommodate MAXINCBP

Setting MAXINCBP might require a corresponding increase to LRETBL. That is, if MAXINCBP is 10, you might want to increase LRETBL by 10%. MAXINCBP is the upper boundary on the required increase — the actual increase will be somewhat less.

Decreasing free space

Free space will be decreased by increasing Table(s) B, D, and/or E.

If you wish to make the overall size of the file smaller because there is too much free space, you can use the DUMP and RESTORE commands to decrease the size or number of data sets.

Decreasing Tables B, D, or E

Tables B, D, and E are decreased by reassigning unused pages in them to free space. Therefore, the parameters BSIZE and BHIGHPG, DSIZE and DHIGHPG, or ESIZE and EHIGHPG must be viewed to determine the number of unused pages in the table in question.

Syntax

The format of the DECREASE command is:

DECREASE {TABLEB | TABLED | TABLEE} n

Where:

n is a decimal number.

  • For TABLEB, n can be in the range 1 through the value of BSIZE, minus BHIGHPG, minus 1.
  • For TABLED, n can be in the range 1 through DSIZE, minus DHIGHPG, minus 1. DHIGHPG represents the highest Table D page used.

    DECREASE processing will remove only a contiguous set of pages from the end of a table. Because of the way in which Table D pages are managed, the unused pages might not be contiguous. This is especially likely in files where procedures are heavily updated. Under these circumstances, Table D cannot be decreased by the full number of unused pages. If the DECREASE command specifies more pages than can be reassigned to free space, you receive the message NOT ENOUGH ROOM IN TABLE. If this happens, try the DECREASE command again with a smaller number.

  • For TABLEE, n can be in the range of 0 through ESIZE, minus EHIGHPG, minus 1.

You must open the file exclusively before you issue the DECREASE command. Processing the command automatically changes the values of FREESIZE and BSIZE, DSIZE, or ESIZE, respectively.

Space management

The number of pages in a Model 204 table can be increased using the INCREASE TABLEB, INCREASE TABLED, or INCREASE TABLEE commands. If there are insufficient pages in FREESIZE to accommodate the increase, new pages can be added, also dynamically, to FREESIZE using the INCREASE DATASETS command.

When data growth can be anticipated, these increases can be made in advance and file availability remains unaffected. However, these increases are not automatic. You must anticipate the increase required and issue the commands manually prior to running update transactions that require the additional pages.

If it becomes necessary to increase the size of Table B, D, E, or X, free space might not contain enough unassigned pages. Choose one of the following methods to increase free space:

  • Decrease some other table.

    For example, if only two pages are in the free space of file CARS, and three unused pages are in Table B, the following sequence of commands adds five pages to Table D:

    OPEN CARS DECREASE TABLEB 3 INCREASE TABLED 5

  • Use DUMP and RESTORE to increase the size or number of the file data sets (see File dumping and restoring).

Adding new pages with the INCREASE DATASETS command

When free space is exhausted, you can manually add new pages dynamically with the INCREASE DATASETS command.

  • First, allocate a new data set, perhaps using the ALLOCATE command as follows:

    ALLOCATE YOURF2 WITH SCOPE=SYSTEM SEQUENTIAL CATALOG - VOLUME=CCAVOL UNIT=3390 PRI 10 CYL BLKSIZE=6184 - DSN=CCA.YOURFILE.YOURF2.M204

    For information regarding dynamic creation of data sets, see the ALLOCATE command .

  • The INCREASE command allows you to add data sets to the file. The pages of the new data sets are automatically added to free space. The format of this command is:

    INCREASE DATASETS WITH name1[,name2 ...]

    where name1, name2, and so on are the names of the new data sets.

For example, you can issue the following commands to add free space in YOURF2 to YOURFILE.

OPEN YOURFILE UPDATE PASSWORD INCREASE DATASETS WITH YOURF2

The lettered blocks in the following figures represent pages for Tables A, B, C, D, and E; the F blocks represent free pages (or FREESIZE). Now you have added all of the pages in YOURF2 to FREESIZE in YOURFILE.

YOURFILE
A A A B B
B B C D D
D D D D D
D D D E E
F F F F F

Combine YOURF2 with YOURFILE:

YOURF2
F F F F F
F F F F F
F F F F F
F F F F F
F F F F F

The logical Model 204 file named YOURFILE is now composed of two data sets and two DDNAMES: YOURFILE and YOURF2. You can issue an INCREASE DATASETS command as many times as necessary to add new data sets and new pages to FREESIZE

For example, suppose that you want to add a third data set to the CARS file, which already has two data sets.

z/OS example

//JOB INCREASE DATASETS IN FILE CARS // EXEC (Include here the basic JCL or cataloged procedure invocation provided by the Model204 system manager to run BATCH204). //CARS DD DSN=M204.FILE.CARS,DISP=SHR //CARS2 DD DSN=M204.FILE.CARS2,DISP=SHR //CARS3 DD DSN=M204.FILE.CARS3, // DISP=(NEW,CATLG),VOL=SER=DSK012, // UNIT=3380,SPACE=(TRK,27) //CCAIN DD * User 0 parameters OPEN CARS INCREASE DATASETS WITH CARS3 CLOSE ALL EOJ /*

z/VSE example

// JOB INCREASE DATASETS IN FILE CARS . . . // DLBL CARS,'M204.FILE.CARS',,DA // EXTENT ,volser // DLBL CARS2,'M204.FILE.CARS2',,DA // EXTENT ,volser // DLBL CARS3,'M204.FILE.CARS3',,DA // EXTENT ,volser // UPSI 10000000 // EXEC BATCH204,SIZE=AUTO User 0 parameters OPEN CARS INCREASE DATASETS WITH CARS3 CLOSE ALL EOJ /* /&

z/VM example

For z/VM, use the following INCREASE EXEC. First, allocate CARS3:

M204UTIL ALLOCATE M204 FILE CARS3 M (PRIMARY 95 TRK

Then invoke INCREASE EXEC:

ONLINE BYPASS INCREASE

The INCREASE EXEC follows:

&CONTROL OFF FILEDEF CLEAR * FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK ( XTENT 20 LRECL 6184 FILEDEF CCASTAT M DSN WORK CCASTAT FILEDEF CCAPRINT DISK INCREASE CCAPRINT A FILEDEF CCAAUDIT DISK INCREASE CCAAUDIT A FILEDEF CARS M DSN M204 FILE CARS FILEDEF CARS2 M DSN M204 FILE CARS2 FILEDEF CARS3 M DSN M204 FILE CARS3 FILEDEF CCAIN DISK INCREASE CCAIN A &STACK SYSOPT 128 LIBUFF 600

where the CCAIN file, INCREASE CCAIN, is:

PAGESZ=6184 OPEN CARS INCREASE DATASETS WITH CARS3 EOJ

Automatic increases

Perhaps the worst thing that can happen to a File Manager is a system outage due to tables within files becoming full during processing. To prevent tables from becoming full, some of the functions described above can be automated so that table sizes are changed as needed.

Increasing page size automatically for Tables B, D, and X

The automatic increase option for Tables B, D, and X lets table increases occur without manual intervention. If a file is created with this capability, an automatic increase will occur when the table becomes full due to a lack of allocated pages in one or more of Tables B, D, and X.

Large transaction volumes or significant data growth can increase page requirements beyond what is currently allocated to the file tables. When this occurs, files are marked full, requests are cancelled, and transactions are backed out. Consequently, files might be left unusable for update processing and applications until there can be manual intervention to increase the table size.

Implementing automatic increases in your files can reduce request cancellations and transaction back outs due to table full conditions. This feature expands the ability to provide 24/7 file and application availability.

The page increase is based on the values of the controlling parameters that are set by the file manager or by system defaults that can be set by a system manager.

  • For files created prior to V6R1, the system parameters, if set, are used to increase supported tables that fill.
  • For files created under V6R1 or later, the file and system parameters, if set, are used for automatic increase operations.

If the file parameters are not set, but the system parameters are set, the system parameters are used. If both file and system parameters are set, the file parameters take precedence. If none of the automatic increase parameters are set, no automatic increases can occur.

How automatic increase operates

The automatic increase operation for Tables B, D, and X can add as many as FREESIZE pages to those tables when the file full condition occurs, avoiding the negative consequences of a table filling. Automatic increase reallocates pages from FREESIZE, if pages are available, to the appropriate table. The page increase is based on the values of the controlling parameters that are set by the file and system managers.

  • When one of these tables fills, only that table is increased.
  • A following message is sent to the audit trail regarding an automatic increase event. Also, this event creates a discontinuity, and the information is written to the journal.

    M204.2835: %F TABLE %C INCREASED BY %C PAGES AUTOMATICALLY

  • The automatic increase operation is a non-backoutable transaction, even if the file full event is backed out. As is the case with all file discontinuities, recovery cannot roll back across the automatic increase discontinuity.
  • Automatic increase for Tables B and D is supported for entry order, unordered, and sorted files. Entry order and unordered organizations also support the automatic increase of Table X. For hash key files, automatic increase is supported only for Table D.

Enabling automatic increase

To use automatic increase, the files must be created under V6R1 or later.

The file and system parameters that control automatic increase are: BAUTOINC, DAUTOINC, XAUTOINC, and DEFINCP.

To implement automatic increase capabilities for files created prior to V6R1, you must reorganize the files under a supporting Model 204 release.

DEFINCP system parameter

DEFINCP can be set in the job stream or set by a system manager.

The DEFINCP value represents the percentage of the current table size by which that table can be automatically increased if it fills during processing. DEFINCP applies to Tables B, D, and X based on file organization: Hash key files cannot have BAUTOINC set.

MAXINCBP with Table B automatic increase

The MAXINCBP parameter works for Table B automatic increases the same way it does for manual increases (described above). It sets a limit, as a percentage of BSIZE, on how much Table B can be auto-increased, if BAUTOINC is also set.

When an automatic increase takes place

If FREESIZE is 0, or all automatic-increase parameter values are 0, no automatic increase can occur, and the default processing for a table full condition results.

If a file is opened, no automatic increase occurs for any table. This avoids increasing a file at open time that may have problems with recovery. The DEFINCP parameter can be set with a default percentage increase for Tables B, D, and X, and the table that is lacking space is increased dynamically. If a table becomes full, Model 204 checks the corresponding automatic increase value — BAUTOINC, DAUTOINC, or XAUTOINC. If it is zero, DEFINCP is checked. If it is not zero, the table is increased by DEFINCP percent.

Parameters that affect table size

The following file, system, and table parameters are relevant to the INCREASE and DECREASE commands and the automatic increase feature. They let you determine space usage and space availability in Tables B, D, and X.

Parameter Type Specifies...
BAUTOINC FILE Number of pages for Table B automatic increase.
BHIGHPG TABLES Highest active Table B page number. Because page numbers start at zero, the number of Table B pages concurrently in use is equal to BHIGHPG+1.
BRLIMSZ TABLES Table B base record limit size.
BSIZE TABLES Current number of pages assigned to Table B.
DAUTOINC FILE Number of pages for Table d automatic increase.
DEFINCP SYSTEM Default automatic table size percentage increase.
DHIGHPG TABLES Highest Table D page number that has been used (the Table D highwater mark for the file).
DPGSUSED FILE Number of Table D pages in use.
DSIZE TABLES Current number of pages assigned to Table D.
EHIGHPG TABLES Highest active Table E page number that has been used — the Table E highwater mark for the file.
EPGSUSED FILE Number of Table E pages in use.
ESIZE TABLES Current number of pages assigned to Table E.
FREESIZE TABLES Current number of pages of free space (that is, unassigned pages).
MAXINCBP SYSTEM Maximum dynamic Table B percentage increase.
RECRDOPT TABLES Record options.
XAUTOINC FILE Number of pages for Table X automatic increase.
XHIGHPG TABLES Table X highest active page.
XSIZE TABLES Pages in Table X.