Managing file and table sizes: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
m (misc cleanup)
 
(36 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<p>When you create a file and its tables, whether you use the calculations described in [[ File Size Calculation#File Size Calculation|File Size Calculation]]  to size the tables or the rules of thumb that an experienced File Manager developr over time, there is always some space for growth included. When a <var class="product">Model&nbsp;204</var> file is created, exact disk space requirements are seldom known. Even if perfect, eventually, it will be necessary to revise the space utilized in s file. </p>
<div class="toclimit-3">
<p>
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 <var class="product">Model&nbsp;204</var> 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. </p>
There are three ways to maintain table sizes:
<ul>
<li>Using the [[:Category:FILEMGMT application subsystem|FILEMGMT subsystem]] </li>
<li>(The File Manager) using a number of commands to maintain the table sizes </li>
<li>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 </li>
</ul>
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 <var>[[CREATE command: File|CREATE]]</var> command during a [[File reorganization and table compaction|file reorganization]].
The other tables may be modified using the <var>[[INCREASE command|INCREASE]]</var> and <var>[[DECREASE command|DECREASE]]</var> commands, as follows:
<table class="thJustBold" style="width:90%">
<tr class="head">
<th>Command</th>
<th>Description</th>
<th>Exclusive Access?</th>
<th>Limitations</th></tr>


There are three ways to maintain table sizes: the [[:Category:FILEMGMT application subsystem|FILEMGMT subsystem]] (which see); the File Manager may use a number of commands to maintain the table sizes; or some of those functions may be automated by setting up the 'Auto Increase' parameters in the file so that free space is added to the tables as needed.  
<tr><th>INCREASE TABLEB</th>
<td>Move pages from free space to Table B. </td>
<td>No, but the DYNAMIC sub-parameter is required if you don't have exclusive access. </td>
<td>Segment boundaries need to be taken into account.<p>The <var>[[MAXINCBP parameter|MAXINCBP]]</var> parameter needs to be set if you want to increase Table B beyond the current segment boundary. </p>
<p>
<var>INCREASE</var> cannot be used for Table B in a hashed organization file (FILEORG = X'08').</p></td></tr>


The latter two are described below.  
<tr><th>INCREASE TABLED<br/>INCREASE TABLEE or<br/>INCREASE TABLEX</th>
<td>Move pages from free space to this table. </td>
<td>No. </td>
<td>Up to maximum table size.
<p><var>XSIZE</var> cannot be increased from 0. </p></td></tr>
<tr><th>DECREASE TABLEB<br>DECREASE TABLED<br>DECREASE TABLEE<br> or<br>DECREASE TABLEX</th>
<td>Move pages to free space from the respective table. </td>
<td>Yes. </td>
<td>Only if the <i>x</i>HIGHPG (<i>x</i> for the respective table) statistic permits. it </td></tr>
<tr><th nowrap>INCREASE DATASET</th>
<td>Add an additional dataset to a Model 204 file. </td>
<td>No. </td>
<td>A model 204 file may have up to 255 datasets.
<p>
The additional pages are formatted as free space. </p></td></tr>
</table>
==Increasing Tables B, D, E, and X ==
<p>
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 <var>[[FREESIZE parameter|FREESIZE]]</var> parameter using the <var>[[VIEW command|VIEW]]</var> command to make sure that unassigned pages are available. If they are not, you can use <var>INCREASE DATASETS</var> to [[#Adding_new_pages_with_the_INCREASE_DATASETS_command|add new pages]]. </p>
===The INCREASE command===


== Overview of Capabilities ==  
====Syntax====
 
<p>
Because of the hashed nature of Tables A and C, these tables can only be changed with the [[CREATE command: File|CREATE command]] during a [[File Reorganization and Table Compaction|file reorganization]].
The format of the <var>INCREASE</var> command is:</p>
 
<p class="syntax">INCREASE {TABLEB | TABLED | TABLEE | TABLEX} <span class="term">n </span> [DYNAMIC]
The other tables may be modified using the [[INCREASE command|INCREASE]] and [[DECREASE command]], as follows:
 
:{| class="wikitable";style="width="90%
|-
! align="center" scope="col" | Command
! align="center" scope="col" | Description
! align="center" scope="col" | Exclusive Access?
! align="center" scope="col" | Limitations
|-
! scope="row"| [[INCREASE command|INCREASE]] TABLEB
| Move pages from free space to Table B
| No, but the DYNAMIC sub-parameter<br/> is required if you don't have exclusive<br/> access
| segment boundaries need to be taken into account<br/>the [[MAXINCBP parameter]] needs to be set if you wish to increase Table B beyond the current segment boundary. <br/> INCREASE cannot be used for Table B in a hashed organisation file ( FILEORG = x'08' ) 
|-
! scope="row"| [[INCREASE command|INCREASE]] TABLED<br/>TABLEE or<br/>TABLEX 
| Move pages from free space to this table
| No
| Up to maximum table size.<br/> XSIZE cannot be increased from 0.
|-
|-
! scope="row"| [[DECREASE command|DECREASE]] TABLEB<br/>TABLED<br/>TABLEE<br/>TABLEX 
| Move pages to free space from the respective table
| Yes
| Only if the ?HIGHPG (for the respective table) statistic permits it
|-
! scope="row"| [[INCREASE command|INCREASE]] DATASET
| Add an additional dataset to a Model 204 file.
| No
| A model 204 file may have up to 255 datasets<br/>
The additional pages are formatted as free space 
|}
 
==Increasing Tables B, D, E, and X ==
<p>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, see [[#Increasing free space manually|Increasing free space manually]]. </p>
<p>The format of the INCREASE command is:</p>
===Syntax===
<p class="code">INCREASE {TABLEB | TABLED | TABLEE | TABLEX} <var class="term">n </var> [DYNAMIC]
</p>
</p>
<p>where:</p>
<p>
<p>n is a decimal number from 1 to FREESIZE. </p>
Where:</p>
===Example===
<p>
<var class="term">n</var> is a decimal number from 1 to <var>FREESIZE</var>. </p>
====Example====
<p class="code">INCREASE TABLEE 2
<p class="code">INCREASE TABLEE 2
</p>
</p>
===Usage notes===
<p>Executing the command immediately changes the values of FREESIZE and either BSIZE, DSIZE, ESIZE or XSIZE, respectively. </p>
====Usage notes====
<p>The DYNAMIC option applies to only an INCREASE TABLEB command.</p>
<ul>
<p>For Tables B and X, you must take into account _RECPPG and the maximum number of slots.</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>


===Special considerations Increasing Table B without exclusive access ===
<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>


==== The DYNAMIC Option ====
<li>For Tables B and X, you must take into account <var>[[BRECPPG parameter|BRECPPG]]</var> and the maximum number of slots.</li>
<p>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:</p>
</ul>
===Increasing Table B without exclusive access ===
====The DYNAMIC option====
<p>
If you do not have exclusive access to the file and still need to increase the size of Table B, you must specify <var>DYNAMIC</var> (or <var>DYN</var>) on the <var>INCREASE TABLEB</var> command to force the increase to occur (even though requests have already been compiled against the file). The command would look something like:</p>
<p class="code">INCREASE TABLEB 10000 DYNAMIC
<p class="code">INCREASE TABLEB 10000 DYNAMIC
</p>
</p>
==== The [[MAXINCBP parameter]] ====  
<p>Even with the DYNAMIC option, you may only increase the size to the next segment boundary. (The number of segments in a file is used as part of the procedure compilation<p>
====MAXINCBP parameter====
This limitation can be alleviated by setting the [[MAXINCBP parameter]].  
<p>
<p>The MAXINCBP system parameter sets a limit, as a percentage of BSIZE, on how much Table B can increase by, either 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.</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>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.</p>
<p>
<p>The total Table B expansion with no MAXINCBP is limited to existing number of segments. If a file is opened without MAXINCBP set yet, then no increase in number of segments is possible. MAXINCBP must be set (or reset) before the file is opened.</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>The MAXINCBP parameter is ignored for any sorted or hash key files.</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>
<p>
The total Table B expansion with no <var>MAXINCBP</var> is limited to the existing number of segments. If a file is opened without <var>MAXINCBP</var> set yet, then no increase in the number of segments is possible. <var>MAXINCBP</var> must be set (or reset) before the file is opened.</p>
<p>
The <var>MAXINCBP</var> parameter is ignored for any sorted or hash key files.</p>
 
====Example of Table B increase====
====Example of Table B increase====
<p>For example, take 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 system parameter MAXINCBP=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.</p>
<p>
<p>These calculations occur when each file is opened for the first time and affect the compilation of requests from that time forward, for that run.</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>
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>
====Increasing LRETBL to accommodate MAXINCBP====
====Increasing LRETBL to accommodate MAXINCBP====
<p>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.</p>
<p>
 
Setting <var>MAXINCBP</var> might require a corresponding increase to <var>[[LRETBL parameter|LRETBL]]</var>. That is, if<var> MAXINCBP</var> is 10, you might want to increase <var>LRETBL</var> by 10%. <var>MAXINCBP</var> is the upper boundary on the required increase &mdash; the actual increase will be somewhat less.</p>
 
 
==Decreasing free space ==
==Decreasing free space ==
<p>Free space will be decreased by increasing Table(s) B, D, and/or E.</p>
<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.
Free space will be decreased by increasing Table(s) B, D, and/or E.</p>
</ul>
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==
<p>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. </p>
<p>
<p>The format of the DECREASE command is:</p>
Tables B, D, and E are decreased by reassigning unused pages in them to free space. Therefore, the parameters <var>BSIZE</var> and <var>BHIGHPG</var>, <var>DSIZE</var> and <var>DHIGHPG</var>, or <var>ESIZE</var> and <var>EHIGHPG</var> must be viewed to determine the number of unused pages in the table in question. </p>
====Syntax====
====Syntax====
<p class="code">DECREASE {TABLEB | TABLED | TABLEE} <var class="term">n</var>  
<p>
The format of the <var>DECREASE</var> command is:</p>
<p class="syntax">DECREASE {TABLEB | TABLED | TABLEE} <span class="term">n</span>
</p>
</p>
<p>where:</p>
<p>
<p>n is a decimal number. </p>
Where:</p>
<p>
<var class="term">n</var> is a decimal number. </p>
<ul>
<ul>
<li>For TABLEB, <var class="term">n</var> can be in the range 1 through the value of BSIZE, minus BHIGHPG, minus 1.           </li>
<li>For <var>TABLEB</var>, <var class="term">n</var> can be in the range 1 through the value of <var>BSIZE</var>, minus <var>BHIGHPG</var>, minus 1. </li>
<li>For TABLED, <var class="term">n</var> can be in the range 1 through DSIZE, minus DHIGHPG, minus 1. DHIGHPG represents the highest Table D page used.  
 
<p>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.</p>
<li>For <var>TABLED</var>, <var class="term">n</var> can be in the range 1 through <var>DSIZE</var>, minus <var>DHIGHPG</var>, minus 1. <var>DHIGHPG</var> represents the highest Table D page used.
<p>
<var>DECREASE</var> 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 <var>DECREASE</var> command specifies more pages than can be reassigned to free space, you receive the message <code>NOT ENOUGH ROOM IN TABLE</code>. If this happens, try the <var>DECREASE</var> command again with a smaller number.</p>
</li>
</li>
<li>For TABLEE, n can be in the range of 0 through ESIZE, minus EHIGHPG, minus 1.</li>
 
<li>For <var>TABLEE</var>, <var class="term">n</var> can be in the range of 0 through <var>ESIZE</var>, minus <var>EHIGHPG</var>, minus 1.</li>
</ul>
</ul>
<p>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.</p>
<p>
 
You must open the file exclusively before you issue the <var>DECREASE</var> command. Processing the command automatically changes the values of <var>FREESIZE</var> and <var>BSIZE</var>, <var>DSIZE</var>, or <var>ESIZE</var>, respectively.</p>
== Space Management ==
<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>
==Space management==
<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>
<p>
<p>When it becomes necessary to increase the size of Table B, D, E, or X, free space might not contain enough unassigned pages. </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>Choose one of the following methods to increase free space:</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>
<p>
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:</p>
<ul>
<ul>
<li>Decrease some other table.  
<li>Decrease some other table.
<p>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:</p>
<p>
<p class="code"><var>OPEN CARS
For example, if only two pages are in the free space of file <code>CARS</code>, and three unused pages are in Table B, the following sequence of commands adds five pages to Table D:</p>
<p class="code">OPEN CARS
DECREASE TABLEB 3
DECREASE TABLEB 3
INCREASE TABLED 5 </var>
INCREASE TABLED 5  
</p></li>
</p></li>
<li>Use DUMP and RESTORE to increase the size or number of the file data sets (see [[ File Dumping and Restoring#File Dumping and Restoring|File Dumping and Restoring]]).</li>
 
<li>Use <var>DUMP</var> and <var>RESTORE</var> to increase the size or number of the file data sets (see [[ File dumping and restoring]]).</li>
</ul>
</ul>
 
===Adding new pages with the INCREASE DATASETS command===
===Adding new pages with the INCREASE DATASETS command===
<p>When free space is exhausted, you can manually add new pages dynamically with the INCREASE DATASETS command. </p>
<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 -
  DSN=CCA.YOURFILE.YOURF2.M204
    DSN=CCA.YOURFILE.YOURF2.M204
</p>
</p>
<p>For information regarding dynamic creation of data sets, see the [[ALLOCATE command]] .</p>
<p>
For information regarding dynamic creation of data sets, see the <var>[[ALLOCATE command|ALLOCATE]]</var> command .</p>
</li>
</li>
<li>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:  
 
<p class="code">INCREASE DATASETS WITH <var class="term">name1</var>[,<var class="term">name2</var> ...]  
<li>The <var>INCREASE</var> 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:
<p class="syntax">INCREASE DATASETS WITH <span class="term">name1</span>[,<span class="term">name2</span> ...]
</p>
</p>
<p>where name1, name2, and so on are the names of the new data sets. </p>
<p>
where <var class="term">name1</var>, <var class="term">name2</var>, and so on are the names of the new data sets. </p>
</li>
</li>
</ul>
</ul>
<p>For example, you can issue the following commands to add free space in YOURF2 to YOURFILE. </p>
<p>
For example, you can issue the following commands to add free space in <code>YOURF2</code> to <code>YOURFILE</code>. </p>
<p class="code">OPEN YOURFILE
<p class="code">OPEN YOURFILE
UPDATE PASSWORD
UPDATE PASSWORD
INCREASE DATASETS WITH YOURF2  
INCREASE DATASETS WITH YOURF2
</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>
<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>
<tr class="head">
<tr>
<th>A</th>
<td>A</td>
<th>A</th>
<td>A</td>
<th>A</th>
<td>A</td>
<th>B</th>
<td>B</td>
<th>B</th>
<td>B</td>
</tr>
</tr>
<tr>
<tr>
<td>B</td>
<td>B</td>
Line 152: Line 206:
<td>D</td>
<td>D</td>
</tr>
</tr>
<tr>
<tr>
<td>D</td>
<td>D</td>
Line 159: Line 214:
<td>D</td>
<td>D</td>
</tr>
</tr>
<tr>
<tr>
<td>D</td>
<td>D</td>
Line 166: Line 222:
<td>E</td>
<td>E</td>
</tr>
</tr>
<tr>
<tr>
<td>F</td>
<td>F</td>
Line 174: Line 231:
</tr>
</tr>
</table>
</table>
<p>Combine YOURF2 with YOURFILE</p>
<p>
Combine <code>YOURF2</code> with <code>YOURFILE</code>:</p>
<table>
<table>
<caption>YOURF2</caption>
<caption>YOURF2</caption>
<tr class="head">
<tr>
<th>F</th>
<td>F</td>
<th>F</th>
<td>F</td>
<th>F</th>
<td>F</td>
<th>F</th>
<td>F</td>
<th>F</th>
<td>F</td>
</tr>
</tr>
<tr>
<tr>
<td>F</td>
<td>F</td>
Line 191: Line 250:
<td>F</td>
<td>F</td>
</tr>
</tr>
<tr>
<tr>
<td>F</td>
<td>F</td>
Line 198: Line 258:
<td>F</td>
<td>F</td>
</tr>
</tr>
<tr>
<tr>
<td>F</td>
<td>F</td>
Line 205: Line 266:
<td>F</td>
<td>F</td>
</tr>
</tr>
<tr>
<tr>
<td>F</td>
<td>F</td>
Line 213: Line 275:
</tr>
</tr>
</table>
</table>
<p>The logical <var class="product">Model&nbsp;204</var> 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. </p>
<p>
<p>For example, suppose that you want to add a third data set to the CARS file, which already has two data sets. </p>
The logical <var class="product">Model&nbsp;204</var> file named <code>YOURFILE</code> is now composed of two data sets and two DDNAMES: <code>YOURFILE</code> and <code>YOURF2</code>. You can issue an INCREASE DATASETS command as many times as necessary to add new data sets and new pages to <var>FREESIZE</var></p>
<p>
For example, suppose that you want to add a third data set to the <code>CARS</code> file, which already has two data sets. </p>
====z/OS example====
====z/OS example====
<p class="code">//JOB INCREASE DATASETS IN FILE CARS
<p class="code">//JOB INCREASE DATASETS IN FILE CARS
// EXEC    (Include here the basic JCL or cataloged
// EXEC    (<i>Include here the basic JCL or cataloged
           procedure invocation provided by the  
           procedure invocation provided by the
           Model204 system manager to run BATCH204).
           Model204 system manager to run BATCH204</i>).
//CARS  DD    DSN=M204.FILE.CARS,DISP=SHR
//CARS  DD    DSN=M204.FILE.CARS,DISP=SHR
//CARS2  DD    DSN=M204.FILE.CARS2,DISP=SHR
//CARS2  DD    DSN=M204.FILE.CARS2,DISP=SHR
Line 231: Line 296:
CLOSE ALL
CLOSE ALL
EOJ
EOJ
/*  
/*
</p>
</p>
====z/VSE example====
====z/VSE example====
<p class="code">// JOB INCREASE DATASETS IN FILE CARS
<p class="code">// JOB INCREASE DATASETS IN FILE CARS
Line 254: Line 320:
/&amp;
/&amp;
</p>
</p>
====z/VM example====
====z/VM example====
<p>For z/VM, use the following INCREASE EXEC. First, allocate CARS3:</p>
<p>
<p class="code"><var>M204UTIL ALLOCATE M204 FILE CARS3 M (PRIMARY 95 TRK </var>
For z/VM, use the following INCREASE EXEC. First, allocate <code>CARS3</code>:</p>
</p>
<p class="code">M204UTIL ALLOCATE M204 FILE CARS3 M (PRIMARY 95 TRK </p>
<p>Then invoke INCREASE EXEC:</p>
<p>
<p class="code"><var>ONLINE BYPASS INCREASE </var>
Then invoke INCREASE EXEC:</p>
<p class="code">ONLINE BYPASS INCREASE  
</p>
</p>
<p>The INCREASE EXEC follows:</p>
<p>
The INCREASE EXEC follows:</p>
<p class="code">&amp;CONTROL OFF
<p class="code">&amp;CONTROL OFF
FILEDEF CLEAR *
FILEDEF CLEAR *
Line 273: Line 342:
FILEDEF CARS3 M DSN M204 FILE CARS3
FILEDEF CARS3 M DSN M204 FILE CARS3
FILEDEF CCAIN DISK INCREASE CCAIN A
FILEDEF CCAIN DISK INCREASE CCAIN A
&amp;STACK SYSOPT 128 LIBUFF 600  
&amp;STACK SYSOPT 128 LIBUFF 600
</p>
</p>
<p>where the CCAIN file, INCREASE CCAIN, is:</p>
<p>
where the CCAIN file, INCREASE CCAIN, is:</p>
<p class="code">PAGESZ=6184
<p class="code">PAGESZ=6184
OPEN CARS
OPEN CARS
INCREASE DATASETS WITH CARS3
INCREASE DATASETS WITH CARS3
EOJ  
EOJ
</p>
</p>


 
==Automatic increases==
== <div id="Resizing Tables (File Management) Automatic Increases">Automatic Increases</div> ==
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.
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 this, 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>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 Tables B, D, and/or 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>
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>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>
<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>
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>
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>
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.0 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.0 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>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>
<p>
===Automatic increase usage===
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>
<p>The automatic increase operation for Tables B, D, and X can add up to FREESIZE pages to those tables when the file full condition occurs and to avoid the negative consequences of a table filling. Automatic increase will automatically reallocate 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. </p>
 
===How automatic increase operates===
<p>
The automatic increase operation for Tables B, D, and X can add as many as <var>FREESIZE</var> pages to those tables when the file full condition occurs, avoiding the negative consequences of a table filling. Automatic increase reallocates pages from <var>FREESIZE</var>, 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. </p>
<ul>
<ul>
<li>When one of these tables fills, only that table is increased.</li>
<li>When one of these tables fills, only that table is increased.</li>
<li>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.
 
<li>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.
<p class="code">M204.2835: %F TABLE %C INCREASED BY %C PAGES AUTOMATICALLY
<p class="code">M204.2835: %F TABLE %C INCREASED BY %C PAGES AUTOMATICALLY
</p></li>
</p></li>
<li>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. </li>
<li>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. </li>
<li>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.</li>
 
<li>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.</li>
</ul>
</ul>
===Enabling automatic increase===
===Enabling automatic increase===
<p>To use automatic increase the files must be created under V6R1.0 or later. The file and system parameters that control automatic increase are: [[BAUTOINC parameter|BAUTOINC]], [[DAUTOINC parameter|DAUTOINC]], [[XAUTOINC parameter|XAUTOINC]], and / or the [[DEFINCP parameter]]. </p>
<p>
<p>To implement automatic increase capabilities for files created prior to V6R1.0 you must reorganize the files under a supporting <var class="product">Model&nbsp;204</var> release.</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>
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>
===DEFINCP system parameter===
===DEFINCP system parameter===
<p>DEFINCP can be set in the job stream or set by a system manager. </p>
<p>
<p>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 and Sorted files can not have BAUTOINC set). </p>
<var>DEFINCP</var> can be set in the job stream or set by a system manager. </p>
 
<p>
The <var>DEFINCP</var> value represents the percentage of the current table size by which that table can be automatically increased if it fills during processing. <var>DEFINCP</var> applies to Tables B, D, and X based on file organization: Hash key files <i>cannot</i> have <var>BAUTOINC</var> set. </p>
===MAXINCBP  with Table B automatic increase ===
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.
===When an automatic increase takes place===
===When an automatic increase takes place===
<p>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.</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 DEFINCP parameter can be set with a default percentage increase for Tables B, D, and X and the table lacking space will be increased dynamically. When a table becomes full, <var class="product">Model&nbsp;204</var> checks the corresponding automatic increase value--BAUTOINC, DAUTOINC, or XAUTOINC. If it is zero, then it checks DEFINCP. If it is not zero, the table is increased by DEFINCP percent. </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>
===Special considerations for Table B automatic increase ===
<p>
The [[MAXINCBP parameter]] works identically as it does for manual increases (described above).
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>The following file, system, and table parameters are relevant to the INCREASE and DECREASE commands and the Automatic Increase feature, because they enable you to determine space usage and space availability in Tables B, D, and X. </p>
<p>
<table>
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">
<tr class="head">
<tr class="head">
<th>Parameter</th>
<th>Parameter</th>
Line 329: Line 419:
<th>Specifies...</th>
<th>Specifies...</th>
</tr>
</tr>
<tr>
<tr>
<td>BAUTOINC</td>
<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>
<tr>
<tr>
<td>BHIGHPG</td>
<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>
<tr>
<tr>
<td>BRLIMSZ</td>
<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>
<tr>
<tr>
<td>BSIZE</td>
<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>
<tr>
<tr>
<td>DAUTOINC</td>
<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>
<tr>
<tr>
<td>DEFINCP</td>
<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>
<tr>
<tr>
<td>DHIGHPG</td>
<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>
<tr>
<tr>
<td>DPGSUSED</td>
<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>
<tr>
<tr>
<td>DSIZE</td>
<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>
<tr>
<tr>
<td>EHIGHPG</td>
<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>
<tr>
<tr>
<td>EPGSUSED</td>
<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>
<tr>
<tr>
<td>ESIZE</td>
<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>
<tr>
<tr>
<td>FREESIZE</td>
<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>
<tr>
<tr>
<td>MAXINCBP</td>
<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>
<tr>
<tr>
<td>RECRDOPT</td>
<th>RECRDOPT</th>
<td>TABLES</td>
<td>TABLES</td>
<td>Record options</td>
<td>Record options.</td>
</tr>
</tr>
<tr>
<tr>
<td>XAUTOINC</td>
<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>
<tr>
<tr>
<td>XHIGHPG</td>
<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>
<tr>
<tr>
<td>XSIZE</td>
<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>
<p>&nbsp;</p>
 
<!-- end of toclimit div -->


[[Category:File management]]
[[Category:Model 204 files]]

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.