Jump to content

Job File Table

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 80.254.191.241 (talk) at 01:35, 22 September 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The Job File Table (JFT) is a DOS data structure in the Program Segment Prefix (PSP). For each open file handle, DOS stores the index into the System File Table. A file handle that is returned by open, _open and other similar functions is simply an index into the JFT where DOS stored the SFT entry index for the file or device that the program opened.

When a program starts, the first 5 entries in the JFT are preconnected to the standard devices. The standard devices are initialised as follows

 Handle  Description
 0       standard input
 1       standard output
 2       standard error

Handles 0-2 are connected to the console device. During programm execution they can get modified (closed, redirected) like any other handle.

Because the size of the JFT in the PSP is 20 bytes, you could originally only open 15 files (20-5 standard devices). As of MS-DOS 3.3 the Extended Job File Table was introduced, which allowed to open up to 255 files.