REORGANIZATION clause SSL
172 U929-J-Z125-9-76
5.5 Defining the extent of table reorganization desired
DYNAMIC REORGANIZATION SPANS intege r PAGES
If, when records are stored, the storage space requirements a re formed to exceed those
initially calculated on the basis of the POPULATION clause, UDS/SQL automatically
performs a table extension. A table that is not quite the size of a page but that cannot be
extended by at least two table lines within its page is continued in a furthe r page by
UDS/SQL. If a table spans several pages, however, and the part to be extended requires
an entire page, UDS/SQL can search a certain number of the pages containing the lo gically
adjacent parts of the table for free space.
integer denotes the number of table pages to be searched. In the case of pointer arrays, lists,
sort key tables and set SEARCH key tables, this specification only takes e ffect if the set has
not been defined with ORDER IS LAST/FIRST.
The pages to be searched are, at the same time, the pages submitted to UDS/S QL for
dynamic reorganization.
If UDS/SQL finds free space for a new table entry within these pages, this space is
relocated to the place where the table entry is to be inser ted.
If, however, all pages searched are completely filled with table entries, UDS/SQL extends
the table by one empty page after the searched pages. Further reorganization depends o n
the place at which the table entry is inserte d.
1. The table entry is to be inserted in the table but not at the beginning or at the end:
UDS/SQL evenly distributes the contents of the searched pages and the new table entr y
over the storage space which has been extended by one page.
2. The table entry is to be appended at the end of the table. The new page contains the
last table entry and the new table entry.
3. The table entry is to be inserted at the beginning of the table: UDS/SQ L moves the
contents of the first table page, with the exception of the first entry, to the new page. The
table entry to be inserted is stored in the first p age.
By this method, a high occupancy level is achieved for the table pages. In cases 2) and 3),
the occupancy level is obtained using the following formula:
n-1
Occupancy level [%] =  x 100
n
where n is the maximum number of table entries per page.