Skip to content

APSD - Print Disk Directory

Purpose

This utility sends the contents of a disk directory to a printer. The following is listed for each file on the disk (where available):

  • File name
  • Record size
  • File type
  • Records in use
  • Key size
  • Available records
  • Starting, ending, and total sectors

For programs that have a REMark as the first statement, the REMark is printed as the program ID. The listing may be sorted in either location or alphabetical order.

Procedure

To run this utility from Thoroughbred Basic Console Mode, type:

RUN “*APSD” and press Enter.

To select this utility from the Thoroughbred Basic Utilities Menu, type one of the following:

A and press Enter.

*A and press Enter.

*APSD and press Enter.

Menu option # and press Enter.

Due to differences within the operating systems that Thoroughbred Basic runs on, there are variations within the utilities. The information that follows here provides an overview of the procedure. Follow the instructions that apply to your operating system.

Once you enter the *APSD Utility the system prompts for the printout format:

ENTER PRINTER WIDTH: (1) 80 CHARACTERS OR (2) 132 CHARACTERS

Choose a printout style.

DISC NAME OR NUMBER

Enter a valid disk name or number.

SELECT PRINTER: xx xx (where xx is a configured printer)

Make your selection from the list of available printers displayed in the prompt. Printers displayed in background mode are currently being used by another task and, therefore, are unavailable. If the requested printer cannot be opened, the user is prompted to make another selection. If only one printer is configured this question is not asked. Next, the system prompts for the format of the printout:

BY LOCATION, MASKS OR NAME (L/M/N):

Type L and press Enter to sort the directory in location order, type M and press Enter to sort the directory by masks or type N and press Enter to sort in alphabetical order.

If location order is selected, no sort is necessary because the directory already exists in defined order. If masks are selected, refer to the *BPSD Utility for more information on masks. If name is selected, the system sorts the files alphabetically.

TYPES (I=IND, D=DIR, S=SRT, R=SER, P=PGM M=MKEY, T=TEXT, C=CISAM)

Enter up to 8 characters representing the types of files you want displayed or press Enter to display all file types. If a character other than I(ndex), D(irect), S(ort), R(Serial), P(rogram), M(KEY), T(EXT), or C(ISAM) is entered, or if more than 8 characters are entered, you will be prompted again.

ENTER FILENAME OR MASK; (@) FOR ALL, (CR) TO END

Type up to 48 file names or masks and press Enter, or type @ and press Enter to list all the names in the directory. If a specified file does not exist on the disk, or if a file does not match the selected type, the name is rejected. After entering each name or mask, press Enter once. After you have entered all the names or masks, press Enter again to continue with the procedure. To exit the utility, press F4.

FROM NAME

Type the name of the first file to be displayed and press Enter, or press Enter to set this parameter to the first name in alphabetical order.

TO NAME

Type the name of the last file to be displayed and press Enter, or press Enter to set this parameter to the last name in alphabetical order.

After all the requested information has been supplied, the system sorts the file (if necessary) and prints the directory information. The following list explains the information provided in the printout:

Heading Explanation
NAME Fourteen-character name
TYPE File type (listed below): IND = INDEXED files SER = SERIAL files SRT = SORT files DIR = DIRECT files PGM = Program files SDR = System directory TXT = TEXT files MKY = MSORT files ISM = TISAM files DRX = Auto-expanding DIRECT files SRX = Auto-expanding SORT files
START SECTOR Location of the beginning of the file on the disk
END SECTOR Last sector used by the file
TOTAL Number of sectors used by this file
KEY For SORT and DIRECT files, the length of the key in bytes. For other file types, this field is 0.
RECORDS Number of logical records in the file. For PROGRAM files this field is 1. For SORT files, it is the number of keys.
RECLEN or BYTES/RECORD Record length in bytes. This field is 0 for SORT files.
IN USE Number of records used. For programs, this is the actual length of the program in bytes.
PROGRAM ID The contents of the first REM statement in a program or NONE if the first statement is not a REM. If the file is a directory, DIRECTORY appears in this field. If the file is an object library, OBJECT LIBRARY appears in this field.

Error Messages

CAN'T DEFINE WORK FILE ON DISK nn, ERROR = xx
The utility was unable to create a file to sort the directory in alphabetical order. Control returns to the LOCATION, MASKS, OR NAME prompt. If the disk is full, enter console mode and erase unnecessary files. Otherwise, check the read/write permissions.
DISK nn NOT CONFIGURED
The disk number given is invalid, the disk does not have a Thoroughbred Basic directory, or the disk is disabled.
ERROR xx HAS OCCURRED, CR TO CONT, CTL4 TO END
An unexpected error has occurred, probably I/O related.
PRINTER IN USE
The requested printer is being used by another task; select another.
PRINTER NOT READY
The requested printer is off-line (i.e., not turned on, out of paper, out of toner, etc.). Correct the problem and try again, select another printer, or F4 to return to the Utilities Menu.
"xxxxxxxx" NOT A DIRECTORY
The disk ID named was opened and was not a directory. Enter another disk ID.
PERMISSION DENIED OF DISK xxx
This utility could not read the specified disk.
FILE NAME IS TOO BIG, SKIPPING
The file name contained too many characters. Enter SKIP to prevent redisplay of this message.

From the Thoroughbred Basic Utilities, version 8.9.1. Open this page in the PDF