NEW SYSTEMDIRECTORY (Replace an Existing SYSTEMDIRECTORY)

You can use the NEW SYSTEMDIRECTORY command to change the area length of a SYSTEMDIRECTORY to 2000, 4000, or 44000 sectors. See the description of the SYSTEMDIRECTORY system option in SYSOPS (System Options) for more information on the correlation between area sectors and disk formats.

The command copies records from the current SYSTEMDIRECTORY for the specified family and replaces the current SYSTEMDIRECTORY with the copy. You can use the NEW SYSTEMDIRECTORY command to expand or reduce the number of allocated areas in the SYSTEMDIRECTORY for a family.

Before you use this command, make a complete backup of the files on the family. This backup gives you a method of recovery if software or hardware errors cause the NEW SYSTEMDIRECTORY command to generate defective records.

Syntax

Explanation

NEW SYSTEMDIRECTORY ON <family name> AREASECTORS 2000

NEW SYSTEMDIRECTORY ON <family name> AREASECTORS 4000

NEW SYSTEMDIRECTORY ON <family name> AREASECTORS 44000

Copies records from the current SYSTEMDIRECTORY for the specified family and replaces the current SYSTEMDIRECTORY with the copy. The area sectors for the new SYSTEMDIRECTORY is 2000 or 4000. The new SYSTEMDIRECTORY has the minimum number of AREAS necessary to hold the disk file headers copied from the old SYSTEMDIRECTORY.

Use this form of the command to change the area length of the specified SYSTEMDIRECTORY to 2000, 4000, or 44000 sectors. You can store more files on a family if the AREASECTORS value of the directory is 4000 instead of 2000. Refer to the SYSOPS SYSTEMDIRECTORY description in SYSOPS (System Options) for details on AREASECTORS.

NEW SYSTEMDIRECTORY ON <family name> AREAS <number>

Copies records from the current SYSTEMDIRECTORY for the specified family and replaces the current SYSTEMDIRECTORY with the copy. The new SYSTEMDIRECTORY has at least the number of areas requested. If the disk file headers copied from the old SYSTEMDIRECTORY do not fit in the new directory, then the system increases the number of areas so that they fit. The area sectors for the new SYSTEMDIRECTORY stay the same as for the old SYSTEMDIRECTORY.

Use this form of the command to ensure that the SYSTEMDIRECTORY for the disk is large enough to hold a given number of files. By pre-expanding a SYSTEMDIRECTORY with a large enough number of AREAS, you can ensure that the system will not stop and wait for the operator to remove some files when you are adding files to the family.

NEW SYSTEMDIRECTORY ON <family name> AREASECTORS 2000 AREAS <number>

NEW SYSTEMDIRECTORY ON <family name> AREASECTORS 4000 AREAS <number>

NEW SYSTEMDIRECTORY ON <family name> AREASECTORS 44000 AREAS <number>

You can use this form of the command to convert a SYSTEMDIRECTORY with an AREASECTORS value of 600 to 2000, 4000, or 44000 and to pre-expand the directory so that the system will not stop and wait for directory space when you add files to the family.

Copies records from the current SYSTEMDIRECTORY for the specified family and replaces the current SYSTEMDIRECTORY with the copy. The new SYSTEMDIRECTORY will have at least the number of areas requested. If the disk file headers copied from the old SYSTEMDIRECTORY do not fit in the new directory, then the system increases the number of areas so that they fit.

Example

The following example shows how to create a new SYSTEMDIRECTORY for the disk family named PACK with AREASECTORS set to 2000 sectors.

NEW SYSTEMDIRECTORY ON PACK AREASECTORS = 2000  

Considerations for Use

Restrictions

You cannot use the NEW SYSTEMDIRECTORY command on the active halt/load family.

You cannot use the NEW SYSTEMDIRECTORY command on a family with a duplicate or triplicate SYSTEMDIRECTORY, or on a disk family that is marked as SHARED. By using the "DD - ON <family name>" and "DD ON <family name>", and the "SHARE - <family name>" and "SHARE <family name> LEVEL <number>" commands respectively, you can cancel these features before using the NEW SYSTEMDIRECTORY command and restore them after the new SYSTEMDIRECTORY process is finished.

Avoid using the NEW SYSTEMDIRECTORY command when the system is running critical application programs. The process that copies and creates the NEW SYSTEMDIRECTORY runs at a very high priority. The new SYSTEMDIRECTORY process uses about twice as much time as a DD process. After creating the new SYSTEMDIRECTORY, the process performs a family (and catalog) rebuild for the family. The new SYSTEMDIRECTORY process procures the directory lock for the family while it is running. This action blocks all access to the SYSTEMDIRECTORY of the family. Any program or command (such as PD or SL) that attempts to use the SYSTEMDIRECTORY must wait for the new SYSTEMDIRECTORY process to finish.

Avoid using the NEW SYSTEMDIRECTORY command on disk families that are STANDBY halt/load units during times when the system is running critical application programs. The new SYSTEMDIRECTORY process procures the directory lock for the family while it is running. In the case of a family that is a STANDBY halt/load family, this blocks the system from updating any of the special tables on that family. If there are other STANDBY halt/load families online, the blockage on the family for which the new SYSTEMDIRECTORY process is running might block the system from updating the tables on some of those other STANDBY halt/load families, too. The tables include the Mirror Information Table, the Configuration Table, the SL Table, and others.

Changing the Size of the SYSTEMDIRECTORY for a Disk Family

The following three system commands enable you to change the size of the SYSTEMDIRECTORY for a disk family.

  • EXPAND SYSTEMDIRECTORY/<number> ON <family name> AREAS<number>

    The primary purpose of this command is to preexpand the SYSTEMDIRECTORYs for a given family.

    Preexpanding the SYSTEMDIRECTORYs for a family helps to ensure that the system is not delayed waiting for disk space on the base pack to expand the SYSTEMDIRECTORY while you are adding files to the family.

  • NEW SYSTEMDIRECTORY ON <family name>

    The primary purpose of this command is to change the AREASECTORS value of the SYSTEMDIRECTORY on the indicated family.

    You can change the AREASECTORS to 2000, 4000, or 44000 sectors. A SYSTEMDIRECTORY with 4000 sectors per area can store roughly 66 percent to 100 percent more files than a SYSTEMDIRECTORY with 2000 sectors per area.

  • SQUASH SYSTEMDIRECTORY ON <family name>

    The primary purpose of this command is to reduce the size of the SYSTEMDIRECTORY for the family and return unused AREAS to the available disk space pool for use by normal files.

    Use this command for disk families that at one time contained a large number of files but no longer contain or need to contain so many files.

    Note that this function is completely different from the function of the "SQUASH <family name>" system command, which attempts to reduce the checkerboarding of the available disk space pool.

Performance

The SQUASH SYSTEMDIRECTORY and NEW SYSTEMDIRECTORY commands both use the same algorithm as follows:

  • Make a new copy of the SYSTEMDIRECTORY and, in the process, assign new record numbers to each record (each disk file header) copied from the old directory to the new directory.

  • Adjust the linkages between segments of all segmented disk file headers in the directory (for example, the disk file headers for files with more than 2000 AREAS).

  • Execute a family rebuild or catalog rebuild for the family to update the record number information in the FAST or CATALOG.

  • Go through the main memory and update the record numbers in the disk file headers for all permanent disk files that are currently open or are in the STRUCTURE HEADER cache.

To make a coherent copy of the directory, the process procures various locks to block all access to the SYSTEMDIRECTORY by programs and system software. This activity blocks the opening and closing of files on the family, the removal of files from the family, the changing of the file name or other attributes of files on the family, and so forth. The locks also block the use of the PD (Print Directory) and other system commands; CANDE FILES and LFILES commands, and MARC commands that reference the family. In some cases, the blockage can extend to uses of the PER PK command either manually or in an ADM (Automatic Display Mode) display.

Postpone using the SQUASH SYSTEMDIRECTORY and NEW SYSTEMDIRECTORY commands until a time when critical programs are not running. Before using either of these commands, consider using the ADM ST system command on any ODT that is running the automatic display of system status with a the display of disk packs (PER PK). Whenever a SQUASH SYSTEMDIRECTORY or NEW SYSTEMDIRECTORY process is running, avoid issuing any commands that reference disks, such as PER PK (Peripheral Status), PD (Print Directory), MP (Mark Program), and so forth.

The EXPAND SYSTEMDIRECTORY command uses a much simpler algorithm as follows:

  • It searches for available disk space and adds spare AREAS to the SYSTEMDIRECTORY.

  • If it cannot find enough available disk space to reach the number of AREAS that you specified in the command, the system might try performing a special form of the "SQUASH <family name>" process and then try to find more space.

Using EXPAND SYSTEMDIRECTORY is much less disruptive than SQUASH SYSTEMDIRECTORY and NEW SYSTEMDIRECTORY because it does not need to block all access to the SYSTEMDIRECTORY while it is running. Using the EXPAND SYSTEMDIRECTORY command consumes very little processor or I/O time except in cases where it runs out of available disk space. In such cases, it attempts to move files to make space available.