Skip to content

FIXUP

Fix Up Program File Structure

This directive fixes information in the program file structure of a program on disk.

FIXUP program-name [,ERR=line-ref|,ERC=error-code]
program-name
is a string of 8 characters or fewer used to name the program and its program file.
line-ref
is the program line number or label to branch to if this directive produces an error.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

This directive is generally available starting with release level 8.1B2.

This directive fixes problems in the program file structure, including structural problems with the symbol table.

If this directive cannot OPEN the program file an error results.

This directive fixes only the program file on the disk; it does not affect the program loaded in memory and the user work area. To avoid confusion, do not use this directive on a program on disk that has also been loaded into the user work area.

Problems in a program file structure may exist if the program was built by a utility, rather than by Thoroughbred Basic itself, or if the program was built using the PFP function.

Starting with release level 8.2, this directive has been enhanced to validate format and data name references.

Starting with release level 8.2, a program containing formats and data names has its format and data name references validated against the dictionary. Any errors detected with the program’s formats and data names are saved into the ERRBUF system variable and the FIXUP directive results in an ERR=160. If the FIXUP directive was entered from Thoroughbred Basic Console Mode, the errors detected are displayed to the screen.

Starting with release level 8.3.1, the FIXUP directive can detect duplicate labels. Thoroughbred Basic will generate an ERR=21. The ERRBUF system variable will contain the statement number where the first duplicate was found.

Starting with release level 8.3.1, the FIXUP directive can detect duplicate long user-defined functions. Thoroughbred Basic will generate an ERR=24. The ERRBUF system variable will contain the statement number where the first duplicate was found.

This directive works only on level 8 Thoroughbred Basic programs. If used on a program created in Thoroughbred Basic prior to level 8, an ERR=19 results.

The FIXUP directive looks up labels and format element names and converts them into permanent locations. If you modify a program or format after issuing a FIXUP directive, the locations may change. Before you run the program, you must use the FIXUP directive so that Thoroughbred Basic can find and use the labels or element names.

FIXUP "TESTPGM"

The file structure of program “TESTPGM” is obtained from disk, it is fixed, and the program is saved.

From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF