Previous Topic: Block Data MembersNext Topic: Maximum Space Allocation for One VLS Library


Record Members

Some of the VLS libraries that contain record members are ADRLIB, ADROUT, CA Ideal source libraries, and IDDAT.

A record member requires one block to hold control information and data blocks to hold the records in the member. Use the following procedure to estimate the required number of data blocks per member:

  1. Estimate the number of records per member.
  2. Estimate the average record length: add six bytes to the number of non-blank characters plus the number of single blanks between words.
  3. Estimate the number of records per block: divide the blocksize by the average record length. If necessary, round down the result to the nearest whole number.
  4. Estimate the number of data blocks per member: divide the estimated number of records per member by the estimated number of records per block. If necessary, round up the result to the nearest whole number.

Now, estimate the total number of blocks a record member requires: add the one block that contains control information to the estimated number of data blocks per member.

Even a very small member occupies a complete data block. For example, a member that contains only four records occupies a total of two blocks: one control block and one data block.

Add the numbers you derived from the above guidelines to estimate the total required number of blocks. To build in a safety margin, take a comfortable percentage of that number and add it to the total required number of blocks. This number is the total number of blocks to allocate.

To convert the total number of blocks to the total number of tracks use the following procedure:

  1. Determine the number of blocks per track: divide the track size by the blocksize. If necessary, round down to the nearest whole number.
  2. Determine the total number of tracks: divide the total number of blocks by the number of blocks per track. If necessary, round up to the nearest whole number.

This figure is your initial estimated space requirement. Because VLS reuses released space dynamically, you do not have to make allowances for file expansion caused by updating. To allocate space for a VLS file, use the FORMAT function. See VLSUTIL Function Descriptions If you find that your initial estimate is too low or too high, you can change the space allocation by using the procedure described in How to Modify the Amount of Space in a VLS File.