Skip to content

How to Establish Directories

You can specify a list of directories that Thoroughbred Basic will search to find files specified by Thoroughbred Basic directives. The list of directories is stored in the initial program load (IPL) file. When a user starts Thoroughbred Basic, the information in the IPL file is loaded into memory. If the user does not specify an IPL file, Thoroughbred Basic uses the IPLINPUT file, which is the default.

An IPL file can specify up to 36 directories that will be available to Thoroughbred Basic. Use one of the following methods to modify an IPL file:

  • Edit a Thoroughbred Basic IPL file with vi or some other text editor. You can use this method to create and customize IPL files for each user. Because you can specify directories in more than one IPL file, you can create as many IPL files as you need. For more information on IPL files, please refer to the information on the IPLINPUT File in the Thoroughbred Basic Customization and Tuning Guide – System Files.
  • Use the procedures and information in this section. The install utility can automatically create directories and update the default IPLINPUT file.

You can use the information in the following sections to specify which directories are available to Thoroughbred Basic:

  • To make a directory available to Thoroughbred Basic you can use the procedure and information in the section titled How to Make Directories Available. Thoroughbred Basic handles new directory specifications in two ways:
    1. If the specified directory exists, the install utility makes it available to Thoroughbred Basic.
    2. If the specified directory does not exist, the install utility creates it, and then makes it available to Thoroughbred Basic.
  • To make a directory unavailable to Thoroughbred Basic you can use the procedure in the section titled How to Make Directories Unavailable.
  • To stop making directories available or unavailable to Thoroughbred Basic, you can use the procedure in the section titled How to Leave the Install Utility.
  • To set up subdirectories for more efficient file management, you can use the information in the section titled How to Setup Subdirectories.
  • To speed Thoroughbred Basic execution time, you can make directories temporarily unavailable to Thoroughbred Basic. For more information, please refer to the procedure in the section titled How to Make Directories Temporarily Unavailable.

If you plan to create a list of directories that Thoroughbred Basic will search, you can use the information in the sections titled How to Make Directories Available and How to Leave the Install Utility to place directory specifications in the IPLINPUT file.

From the operating system prompt in your Thoroughbred Basic home directory type

./install

and press the Enter key. The install utility will display the Installation and Updating Procedures Menu:

Thoroughbred BASIC Installation and Updating Procedures
1) Install New System
2) Install/Update User Logins
3) Install/Update BASIC Directories
4) Install/Update BASIC Printers
5) Install/Update BASIC Terminals
6) Install/Update BASIC Ghost Tasks
Enter Selection (1 - 6) or <CR> to end:

You must enter a valid value in the following field:

Enter Selection (1 - 6) or <CR> to end:

To make a directory available to Thoroughbred Basic, type 3 and press the Enter key. The install utility will display the Install/Update BASIC Directories screen:

3) Install/Update BASIC Directories
Currently Defined Directories
0 - UTILS
1 - IDL4
2 - WORK
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

To add a directory, type a and press the Enter key. The following message will be displayed:

ENTER DIRECTORY NAME:

A valid directory name is 1 through 64 characters long. If you do not specify a full directory path, the specified directory is created as a subdirectory of the Thoroughbred Basic home directory.

Type a valid directory name and press the Enter key. The install utility will take one of the following actions:

  • If the directory does not already exist it will create the directory, then put the directory name in the IPLINPUT file.
  • If the directory already exists, it will put the directory name in the IPLINPUT file.

Then, the install utility will redisplay the Install/Update BASIC Directories screen, which will contain the current list of directories available to Thoroughbred Basic. The IPLINPUT file can contain up to ten directories.

If you have finished specifying directories and want to leave the install utility, please refer to the section titled How to Leave the Install Utility.

To make a directory unavailable to Thoroughbred Basic, and delete the directory specification from the IPLINPUT file, use the install utility to display the Install/Update BASIC Directories screen:

3) Install/Update BASIC Directories
Currently Defined Directories
0 - UTILS
1 - IDL4
2 - WORK
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

To delete a directory from the IPLINPUT file, type d and press the Enter key. The following message will be displayed:

ENTER DIRECTORY NAME:

Valid directory names are displayed on the Install/Update BASIC Directories screen. Type the name of the directory you plan to delete and press the Enter key.

The install utility removes the directory specification from the IPLINPUT file. It does not delete the directory. To delete the directory, you must use the UNIX rmdir command.

The install utility will redisplay the Install/Update BASIC Directories screen, which will contain the current list of directories available to Thoroughbred Basic.

To stop making directories available or unavailable to Thoroughbred Basic, make sure the install utility is displaying the Install/Update BASIC Directories screen:

3) Install/Update BASIC Directories
Currently Defined Directories
0 - UTILS
1 - IDL4
2 - WORK
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

Press the Enter key. The install utility will display the Installation and Updating Procedures screen:

Thoroughbred BASIC Installation and Updating Procedures
1) Install New System
2) Install/Update User Logins
3) Install/Update BASIC Directories
4) Install/Update BASIC Printers
5) Install/Update BASIC Terminals
6) Install/Update BASIC Ghost Tasks
Enter Selection (1 - 6) or <CR> to end:

You must enter a valid value in the following field:

Enter Selection (1 - 6) or <CR> to end:

To leave the install utility and return to the operating system prompt, press the Enter key.

Organizing files in subdirectories can help Thoroughbred Basic increase execution speed by cutting the time required to locate program or data files. When a program looks for a file, it begins the search at the top of the directory listing and checks each directory entry in turn. In a large directory, with the target file way down on the list, this search method can take a lot of time.

Some applications reduce search time by using the first characters of the file name like a mask. Files are grouped by the first characters of their names into subdirectories.

To create Thoroughbred Basic subdirectories, you can use the following procedure:

  1. Use one of the directories you have added to Thoroughbred Basic as a parent directory or add a new directory. If you need to add a directory, you can use the information in the section titled How to Make Directories Available. The directory you choose or create will serve as the parent directory for as many subdirectories as you need to create.

  2. Edit the initial program load (IPL) file.

    Locate the Thoroughbred Basic IPL file. In most cases, the file is named IPLINPUT, which is the default. Open the file with vi or some other text editor.

    Find the DEV statement that contains the name of the parent directory. For example, if the parent directory is named MKTG, the DEV statement may be specified as:

    DEV D3,1,,,,,,MKTG

    This statement makes the MKTG directory available to Thoroughbred Basic on directory or disk number 3. To enable subdirectories for MKTG, you must specify a subdirectory flag after the fourth comma, for example:

    DEV D3,1,,,1,,,MKTG

    Valid values for the subdirectory flag are 1 through 9. The flag tells Thoroughbred Basic that subdirectories exist and, with one exception, specifies the length of each subdirectory name. The exception is illustrated in the above example: if you specify 1 for the subdirectory flag, each subdirectory name must be three characters long, so specifying 1 is equivalent to specifying 3.

    After you edit the DEV statement, save the IPL file and exit from the text editor.

  3. Use the mkdir command to create 3-character subdirectory names under the parent directory. There are a few rules and guidelines that can help you make more use of subdirectories:

  • Valid subdirectory names contain the number of characters specified by the subdirectory flag. For example, is you specified 7 as the value of the subdirectory flag, each subdirectory name must be exactly seven characters long. The only exception to this rule is the USR subdirectory, which is described below.
  • A file is a matching file if its first characters are a match for the name of a subdirectory. Matching files will be placed in the subdirectory they match.
  • You must create the USR subdirectory. Files with names that do not match the name of any other subdirectory will be put in the USR subdirectory.
  • You can add or delete subdirectories as needed. If you delete a subdirectory, you will delete all the data files in that subdirectory: you may want to back up the data files before you delete the subdirectory.

For more information on IPL files, please refer to the Thoroughbred Basic Customization and Tuning Guide – System Files.

How to Make Directories Temporarily Unavailable

Section titled “How to Make Directories Temporarily Unavailable”

Making directories temporarily unavailable can help Thoroughbred Basic increase execution speed by reducing the time required to locate program or data files. When a Thoroughbred Basic program looks for a file, it searches through all the directories available to Thoroughbred Basic until it finds the file. Under some circumstances, such as a search for a file that does not exist, this process can take lots of time.

You can cut search time by making directories temporarily unavailable to Thoroughbred Basic. Execution speed will increase when you narrow the scope of the search.

You can use the *JPSD Utility to make directories unavailable to Thoroughbred Basic. Use one of the following methods to start the *JPSD Utility:

  • In Thoroughbred Basic Console Mode, type RUN “*JPSD” and press the Enter key.
  • On the Thoroughbred Basic Utilities Menu screen, type *JPSD or the number that corresponds to the *JPSD Utility and press the Enter key.

Thoroughbred Basic will display the *JPSD - INITIALIZE DISC ENVIRONMENT screen:

*JPSD - INITIALIZE DISC ENVIRONMENT date
# ID VOLUME S
0 D0 UTILS *
1 D1 IDL4 *
2 D2 WORK *
8 D3 APP1 *
17 DH APP2 *
Enter Disk ID code(s) to change:
F6 - Help

An * (asterisk) next to the volume name means that the directory is available to Thoroughbred Basic. To change availability, you must specify a valid value in the following field:

Enter Disk ID code(s) to change:

Type the second character of the ID value for the directory you want to make available or unavailable and press the Enter key. For example, to make the APP2 directory displayed on the above sample screen unavailable, type H and press the Enter key.

Thoroughbred Basic will redisplay the *JPSD - INITIALIZE DISC ENVIRONMENT screen, which will contain the current list of available and unavailable directories.

*JPSD - INITIALIZE DISC ENVIRONMENT date
# ID VOLUME S
0 D0 UTILS *
1 D1 IDL4 *
2 D2 WORK *
8 D3 APP1 *
17 DH APP2
Enter Disk ID code(s) to change:
F6 - Help

To make APP2 available, you can type H and press the Enter key. To leave the *JPSD Utility, press the Enter key.

For more information on the *JPSD Utility, please refer to the Thoroughbred Basic Utilities Manual. If you are displaying the *JPSD - INITIALIZE DISC ENVIRONMENT screen, you can press the F6 key for on-line help.

From the Customization and Tuning Guide: Devices, version 8.9.1. Open this page in the PDF