Error Codes
Each error code and its accompanying message is followed by a description of the conditions that generated the error.
- -1
- Directive or Function Not Available in this Version of BASIC
This release of Thoroughbred Basic or of your operating system does not support the directive or function requested.
- 00
- File or Record or Device Busy/Timeout Error
The program or task has attempted to:
- Access a terminal device that is not ready, e.g., the power was off or the device was off-line.
- DISABLE a disk on which there is an OPEN file.
- ERASE an OPEN file (i.e., OPEN to the current task).
- Access a disk record, which has been EXTRACTed by another task.
- OPEN a file, which has been LOCKed by another task.
- SAVE an ADDed program or ADDR’d program.
- SAVE to an OPEN or LOCKed file. Access a file, which has been LOCKed by another task.
- Communicate with a terminal with the TIM= option, where the specified time has elapsed.
- Define a disk file on a logical disk previously DISABLEd by the same task.
- 01
- End-of-Record
The program or task has attempted to:
- READ a record having a missing field terminator.
- READ more fields than the record contains.
- WRITE a record longer than the defined record length.
- Execute any I/O directive, which specifies more variables than the field terminator characters received.
- PRINT more characters than the defined line length (for a printer terminal).
- 02
- End-of-File
The program or task has attempted to:
- Execute an I/O directive to an INDEXED or DIRECT file with the IND= option specified greater than the defined file size.
- WRITE to a DIRECT or SORT file more records than the defined file size.
- Execute a sequential READ from a DIRECT or SORT file when the file pointer is at the highest value key.
- Reference the KEY or IND function when the file pointer is at the last record.
- READ or WRITE beyond the last record of a file OPENed with the ISZ= option. (Note that the END= option for an I/O directive provides a selective error branch for the ERROR=02 condition.)
- 03
- Key Field Not Found
The program or task has attempted to perform a WRITE where one or more fields were missing from the data to create a key.
- 07
- File Corruption Detected
The program or task attempted to access a file that is unreadable due to corruption.
- 10
- File ID Size or Key Usage
The program or task has attempted to specify a file-ID containing either 0 or more than 8 characters.
- 11
- Missing or Duplicate Key
The program or task has attempted to READ from a DIRECT or SORT file using the KEY= option when the specified key value does not exist for any record in the file (missing key).
Notes: The DOM= option provides a selective error branch for the missing key condition. In the case of a missing key, the result is clear; reading a record that does not exist will produce an ERROR 11, which can be handled by the DOM= option. However, the interaction between the DOM= option and the duplicate key condition is slightly different.
In the case of a duplicate key condition, the result will depend upon whether or not the programmer wants to write to a record that already exists. A WRITE to a DIRECT or SORT file specifying a key value that already exists for a record in the file will overwrite the record, unless the DOM= option is used, in which case program control will be transferred to the statement specified by DOM=.
Note that if the DOM= branch is used for a duplicate key condition, the ERR variable will be set to the value 11, but an actual error condition will not be produced. (Using the DOM= option for a duplicate key is like setting an error flag and automatically handling it in the same action.)
- 12
- Undefined or Duplicate File ID
The program or task has attempted to:
- OPEN, ADD, DROP or ERASE a disk file or program file with a file-ID, which is not found on an available disk. Either the file-ID is not defined or the file is located on a DISABLED disk.
- OPEN a terminal device, which has not been configured for the system.
- Define a disk file with a file-ID, which already exists on an available disk.
- Define a disk file or program using one of the reserved two-character device or task names, (i.e., LP, P1 . . . P9, D1 . . . D9, SY, T0 . . . TF). (These names are reserved only if they appear in the IPL file for the current task.)
- RENAME a file to a name, which already exists, for a file on that logical disk.
- 13
- File/Device Access
The program or task has attempted to:
- Execute an input directive (INPUT, READ, EXTRACT, or FIND) from an output-only terminal device such as a printer.
- WRITE or PRINT to a DIRECT or SORT file where the record to be affected is not specified by KEY= or by the record having been EXTRACTed by this task.
- WRITE to a Serial file if it isn’t locked.
- DROP a program that is busy.
- DROP any device.
- 14
- File/Device Usage
The program or task has attempted to:
- OPEN any file or terminal device on a channel number, which is currently OPENed by the same task.
- Execute an I/O directive with a channel number not currently OPENed by that task.
- DISABLE or ENABLE a logical disk already DISABLEd or ENABLEd (respectively) for the current task.
- LOCK a file, which is not OPENed to the current task.
- LOCK or UNLOCK a file already LOCKed or UNLOCKed (respectively) by the current task.
- 15
- Out of Disk Space
The program or task has attempted to write to a UNIX or Microsoft Windows file on a device that is full.
- 16
- Disk Directory Capacity
The program or task has attempted to:
- Define a disk file when the disk directory is full.
- OPEN a file when the task’s File Control Table is full.
- OPEN, RUN, ERASE or RENAME a file that causes an overflow in the UNIX or Microsoft Windows file table (either the system limit or the process limit).
- 17
- Invalid Parameter
The program or task has attempted to:
- Reference a terminal device, task, or logical disk number, which is not configured for the system.
- Execute a KEY= access to a file other than a DIRECT or SORT file.
- Execute IOR, XOR or NOT directives with strings of unequal lengths.
- SAVE, LOAD, RUN, or FIXUP a non-program file. LIST to or MERGE from a file other than an INDEXED file.
- ADDR a non-program file to the public directory.
- 18
- Illegal Program Encryption Error
The program or task has attempted to:
- Use LIST, EDIT, PGM, MERGE, SAVE or FIXUP on an encrypted program.
- Bypass program security without using the correct password.
- 19
- Program Format or Size
The program or task has attempted to:
- LOAD a program from a PROGRAM file, which is empty.
- LOAD a program whose internal name (in the disk file) does not match the PROGRAM file name.
- LOAD or RUN a program whose size exceeds the available User Task memory area.
- CALL a program whose length exceeds the available User Task memory area.
- FIXUP a program created in Thoroughbred Basic prior to level 8.
- Use CPP on a program-string containing statements with identical program line numbers or statements without a program line number.
- 20
- Statement Structure (Syntax)
The program or task has attempted to:
- Enter or execute a program statement with incorrect or missing punctuation, symbols or operators.
- Enter or execute a program statement with non-existent or incorrectly spelled directives or other syntax words.
- Enter or execute a program statement with incorrect or illegal variable syntax.
- Enter or execute a directive with illegal or conflicting options specified.
- Execute an EDIT directive with illegal parameters or syntax.
- Reference a hexadecimal data element with incorrect or illegal syntax; i.e., the syntax must:
- Contain an even number of characters.
- Contain only numeric characters 0-9 and alphabetic characters A-F.
- Be enclosed in dollar signs ($ . . . $) unless used in a TABLE statement.
- Execute an I/O directive using the KEY function.
- 21
- Statement Number Error
The program or task has attempted to:
- Reference a statement number, which is not a positive integer between 1 and 65534. For i8086-based systems, the range is 1 to 9999.
- Reference a label name that has not been declared, or declare a duplicate label name.
- Execute an EDIT or DELETE directive on a non-existent statement number.
- MERGE a file containing an invalid statement number or an end-of-file.
- MERGE an INDEXED file containing a program with no END statement.
- Use CPP on a program-string containing an undeclared label or a duplicate label.
- 22
- Uninitialized Variable
The program or task has attempted to reference a variable to which a value has not been assigned.
- 24
- Function Name Definition
The program or task has attempted to define a programmable function DEF FNx or DEF FNx$ with the same identification character (x) as another programmable function existing in the same task.
- 25
- Undefined Function
The program or task has attempted to reference a programmable function DEF FNx or DEF FNx$ which has not been defined within the current task.
- 26
- Variable Usage
The program or task has attempted to:
- Specify a non-numeric character in a numeric data element. (Note that the converse specifying a numeric in a string data element is not an error since a numeric character is a string character also by definition.)
- Enter or execute a directive or function with a variable name of the wrong type (numeric or string).
- 27
- RETURN Without GOSUB
The program or task has attempted to:
- Execute a RETURN directive without an active GOSUB or SETESC directive.
- Execute an EXITTO directive without an active GOSUB or FOR directive.
- Execute a RETRY directive without an active SETERR or ERR= directive.
- Execute an EXIT directive from a program, which is not a Public Program.
- EDIT or DELETE a statement which contains an active GOSUB, FOR, SETERR, or ERR= directive.
- 28
- NEXT Without FOR
The program or task has attempted to execute a NEXT directive without an active FOR directive.
- 29
- Undefined Mnemonic Constant
The program or task has attempted to:
- Execute an I/O directive with a mnemonic constant, which is undefined or illegal for the referenced device.
- Execute an I/O directive with a data positioning modifier, which is undefined or illegal for the referenced device.
- Specify an escape code ($1B$) (not followed by a valid mnemonic or positioning specifier) in a data element to a terminal device or printer.
- 30
- Program Checksum Error
The program or task has attempted to LOAD, RUN, LIST or execute the LST or the CPP function on an invalid string.
- 31
- Internal Stack Overflow
The program or task has attempted to execute a program, which overflows the internal stack.
- 32
- Record Too Large for Buffer
The program or task has attempted to execute an I/O directive with a record size larger than the available buffer memory area.
- 33
- Memory Capacity
The program or task has attempted to:
- EDIT or MERGE a statement(s) into the current program whose length causes an over-flow of the user task memory area.
- Execute a program, which exceeds the user task memory area (usually too many or too long string variables).
- Use CPP with insufficient data space as set by the PTN parameters in the IPLINPUT file.
- 34
- FOR/NEXT GOSUB/RETURN Stack Overflow
The program or task has attempted to execute a FOR/NEXT or GOSUB/RETURN directive
which overflows the internal stack.
- 35
- LISTer Stack Overflow
The program or task has attempted to execute a procedure, which overflows the LISTer stack.
- 36
- CALL/ENTER Mismatch
The program or task has attempted to:
- Execute an ENTER directive in a public program with a variable list which does not match (either in number or type of variables) the variable list of the CALL directive which CALLed the program.
- Execute an ENTER directive more than once in a public program.
- Execute an ENTER directive in a non-public program.
- 37
- Structure/Locate Table Overflow
The program or task has attempted to
- INCLUDE a format after the format structure table has reached capacity.
- OPEN a link after the link structure table has reached capacity.
- 38
- Illegal Command in a Public Program
The program or task has attempted to execute an EXECUTE, LIST, RUN, DELETE, SAVE, or MERGE directive in a Public Program.
- 39
- Escape in a Public Program
The program or task has attempted to:
- Execute an ESCAPE directive in a public program.
- Execute an Escape key on the Task VDT during execution of a public program.
- 40
- Numeric Value Overflow
The program or task has attempted to:
- Execute an arithmetic operation resulting in a numeric element outside the range of maximum and minimum values (numbers are limited to a maximum of 128 places):+/- .99999999999999E+141 to +/-.00000000000001E-114.
- Assign the result of a BIN function to a string data element, which is not long enough.
- Execute an arithmetic operation that specifies division by zero.
- 41
- Integer Range
The program or task has attempted to:
-
Reference an I/O channel with an integer outside the range 0 to 14, or 0 to 9 for Z8000-based systems.
-
Reference a logical disk number with an integer outside the range 0 to 35.
-
Reference a file size (number of records) or an INDex (record number) with an integer outside the range 1 to (2^23)-1.
-
Reference a record size (number of bytes) with an integer outside the range 1 to 32767 (4 to 32767 for DIRECT files).
-
Reference a Data Positioning parameter with an integer outside the range 0 to 255.
-
Reference a string subscript in a DIM directive or a substring with an integer outside the range 1 to 32767.
-
Reference a subscript of a numeric array in a DIM directive or variable reference with an integer outside the range 0 to 4094.
-
Define a program size (number of bytes) with an integer outside the range 20 to 5,242,880 (5*1024*1024).
-
Execute a PRECISION directive with an integer outside the range 0 to 14, or 127.
-
Execute an ON GOTO directive where n is an integer greater than 65535.
-
Reference an exponential operation (raising to a power) where the exponent is an integer greater than 32767.
-
Define the KEY field length of a DIRECT or SORT file with an integer outside the valid range.
For most systems: 2 to 144.
For some systems: 4 to 56 when less than 32768 records in file; 4 to 54 when more than 32768 records in file.
-
Reference a step-value in a POS function with an integer outside the range 1 to 32767.
-
Reference a CHR function with an integer argument outside the range 0 to 255.
-
Specify a non-integer for an integer-only numeric data element or parameter.
- 42
- Nonexistent Subscript
The program or task has attempted to:
- Reference an element of a numeric array, which has not been DIMensioned.
- Reference an element of a numeric array with a subscript(s) outside the DIMension limits.
- 43
- Numeric Format Mask Overflow
The program or task has attempted to use a numeric format that overflows the stack.
- 44
- Step Size Zero
The program has attempted to execute a FOR/NEXT directive with a STEP size of 0.
- 45
- Statement Usage
The program or task has attempted to:
- Enter a Thoroughbred Basic Console Mode only statement with a statement number (indicating Thoroughbred Basic Run Mode usage).
- Execute a Thoroughbred Basic Run Mode only statement in Thoroughbred Basic Console Mode.
- Enter or execute a LIST or DELETE directive with a starting statement number specified greater than the ending statement number.
- Reference an undeclared label name in LIST or DELETE.
- Execute an I/O directive with an IOL= option referencing a statement which is not an IOLIST.
- Execute an I/O directive with a TBL= option referencing a statement which is not a TABLE.
- 46
- String Size
The program or task has attempted to:
- Execute an I/O directive with a KEY= option where the specified KEY is longer than the defined KEY length for the file.
- Execute a SETDAY directive with a string argument greater or less than 8 characters long.
- Execute an ASC Function with the null string (“”) specified as the argument.
- 47
- Invalid Substring Reference
The program or task has attempted to reference a substring character position beyond the length of the specified string.
- 48
- Input Verification
The program or task has attempted to:
- INPUT a numeric data element outside the VERIFICATION limits specified in the INPUT directive.
- INPUT a string data element which does not match a string constant specified for VERIFICATION branching (if specified) and whose length does not fall within the LEN= limits specified in the INPUT directive.
- 49
- Global Variable Error
The program or task has attempted to retrieve or delete a nonexistent or invalid global variable name.
- 50
- Cannot Remove Primary Sort
The program or task has attempted to REMSORT the primary key of an MSORT file.
- 51
- Cannot Have More Than 16 Sorts for an MSORT File
The program or task has attempted to use more than 16 sorts in an MSORT file.
- 52
- Cannot Have More Than 16 Sorts for a TISAM File
The program or task has attempted to use more than 16 sorts in a TISAM file.
- 53
- Too Many Segment Definitions
The program or task has exceeded the limit of 16 segment definitions in an MSORT file or 8 in a TISAM file.
- 54
- Primary Key Must Be Unique
The program or task has attempted to define a primary key that is not unique (does not specify “U”, or “u”).
- 55
- Sort Name Too Long
The program or task has attempted to use a sort name of more than 20 characters.
- 56
- Field Number Greater Than 255
The program or task has attempted to define a field in excess of the 255 permitted.
- 57
- Undefined Mode
The program or task has attempted to define a mode with an initial character, and that character is neither “U”, “u”, “D”, nor “d”.
- 58
- Field Does Not Exist
The program or task cannot find a field delimiter ($8A$) for one of the defined sort definitions in an MSORT file.
- 60
- Transaction Log File Not Open
The program has attempted to execute a TRANSACTION BEGIN directive without a LOG
OPEN directive.
- 61
- Transaction in Progress
The program has attempted to execute a directive (or function) that is not allowed in between a transaction start, and the commitment of the transaction.
- 62
- Transaction Not Started
The program has attempted to execute a COMMIT or a ROLLBACK directive without a TRANSACTION BEGIN directive.
- 63
- Transaction Log Already Open
The program has attempted to execute a LOG OPEN when a LOG is currently OPEN already.
- 64
- Channel Not Open For Transaction Modification
The program has attempted to WRITE to a channel that is not OPEN for Transaction Processing.
- 65
- Transaction "IN PROGRESS" File Exists
The entry in the “/usr/lib/Basic/MasterLog/” file has not been properly cleared by a LOG CLOSE or equivalent directive such as RELEASE. This error can only be corrected by changing (or erasing) the contents of the appropriate Task ID slot in the MasterLog File.
- 67
- Transaction Log File could not be created
The program encountered a problem performing a LOG_OPEN during a TRANSACTION BEGIN.
- 70
- Windows Terminal Driver Was Not Selected When This Task Started
This program or task has attempted to execute a window command without first invoking the Thoroughbred Basic Windows terminal driver.
- 71
- Windows Error: Too Many Active Windows or Panels
This program or task has attempted to open a Thoroughbred Basic Window that would exceed the number of Thoroughbred Basic Windows allowed at one time.
- 72
- Windows Error: Attempt to Delete or Save the Main Window
The base Thoroughbred Basic Window, 0, cannot be deleted.
- 73
- Windows Error: Illegal Value in Attribute Map or String
The program or task has attempted to reference an invalid attribute setting. Refer to the command syntax in the Thoroughbred Basic Language Reference for a listing of the valid attributes.
- 74
- Windows Error: The Windows System is Disabled
This program or task has attempted to execute a window command without first invoking the Thoroughbred Basic Windows terminal driver.
- 75
- Windows Error: Illegal Length or Value for Window Name
A Thoroughbred Basic Window Name greater than 8 characters has been entered or invalid characters have been used in the name.
- 76
- Windows Error: Illegal String Parameter Length
The string parameter length specified exceeds the maximum value allowed. Refer to the
command syntax in the Thoroughbred Basic Language Reference for more information.
- 77
- Windows Error: Illegal Numeric Parameter Value
The numeric value entered exceeds the maximum value allowed. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 78
- Windows Error: Wrong Format or Length for Command Option
The format/length specified for the Thoroughbred Basic Window command is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 79
- Windows Error: Illegal Window Command Option Keyword
The command option keyword specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 80
- Windows Error: Attempt to Use the Same Optional Parameter Twice
Each parameter can only be used once in a command.
- 81
- Windows Error: Non-keyword= Option Used as Keyword= Option
The keyword= option specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 82
- Windows Error: Illegal Window Command Option Keyword Value
The command option keyword specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 83
- Windows Error: Border Character Must Be a Printable Character
The Border Character specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 84
- Windows Error: Illegal Format or Value for Border Attribute
The attribute format has not been specified OR is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 85
- Windows Error: Illegal Window Command Option Keyword Value
The value specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 86
- Windows Error: Illegal Window Command Option for This Command
The command option specified is not valid for this command. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 87
- Windows Error: New Window or I/O Region Will Not Fit
The Thoroughbred Basic Window or box specified exceeds the screen size or the I/O region specified exceeds the window size.
- 88
- Windows Error: Undefined or Duplicate Window Name
The Thoroughbred Basic Window Name specified has not been defined or, if defining a new Thoroughbred Basic Window, a Thoroughbred Basic Window has already been defined with that name.
- 89
- Windows Error: Wrong Format for Window Contents Map(s)
The format specified for the Thoroughbred Basic Window contents map is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 90
- Windows Error: Map Length Wrong for this Window or I/O Region
The map length specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 91
- Windows Error: Illegal Map Type
The map type specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 92
- Windows Error: Unprintable Character in Text Map or String
Unprintable characters are not allowed in text maps or strings.
- 93
- Windows Error: I/O Region Column and/or Row Count is Zero
The column and/or row count specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 94
- Windows Error: Illegal Coordinate and/or Length for Get/Put Command
The coordinate and/or length specified is invalid. Refer to the command syntax in the Thoroughbred Basic Language Reference for more information.
- 95
- Windows Error: Cannot Change a Function Key that Does Not Exist
The function key that has been specified is invalid. Refer to your terminal table for a listing of acceptable function keys.
- 103
- Unexpected Operating System Error
The program or task has attempted to perform some operation, or some condition has occurred which is not covered by the above error processing codes and which may be unique to a particular operating system.
- 107
- Secondary Key file is out of sync with Data File
For a link OPENed with OPT=“DLINK”, one of the following errors was encountered while processing the secondary keys during a WRITE:
- No sorts are defined or specified sort is not defined for the link.
- An invalid sort field was detected.
- An error occurred during the numeric conversion of one of the sort fields. See TCB(43) for the Basic error code.
- An error occurred during I/O processing. See TCB(43) for the Basic error code.
- 127
- [No Message; Not an Error]
When Escape is pressed, ERR is set to 127, but no error condition is generated.
- 150
- Unexpected Foreign Server Error
An unexpected error has occurred in one of the SQL DataServers. See TCB(20) for the
DataServer error code.
- 160
- Program Contains Invalid Format/Data Name References
The program or task has attempted to SAVE or FIXUP a program containing format/data name references.
- 161
- Undefined Format Name
The program or task has attempted to:
- INCLUDE a format that does not exist in the data dictionary
- Reference a format/data name except for DEFAULT, DELETE, and INIT directives, that has not been INCLUDEd.
- 162
- Format Name Has Not Been INCLUDEd
The FORMAT DEFAULT, DELETE, or INIT references a format that has not been INCLUDEd by the current program.
- 163
- Undefined Data Name
The program or task has attempted to reference a data name that does not exist in the format’s data element table.
- 164
- Data Name Does Not Allow Multiple Occurrences
The program or task has attempted to reference a data name with an occurrence that was defined to be a single occurrence.
- 165
- Invalid Occurrence
The program or task has attempted to:
- Reference a data name without an occurrence that was defined to have multiple occurrences
- Reference a data name with an occurrence that is not in the range of defined occurrences.
- 166
- String/Numeric Mismatch of Data Name
The program or task has attempted to assign an alphanumeric value to a data name that was defined to be numeric.
- 167
- Invalid Value For Data Name
The program or task has attempted to:
- Assign a value to a data name that does not meet its defined attributes (i.e., date type, numeric type, input type, …).
- FINPUT a data name that does not meet its defined attributes (i.e., date type, numeric type, input type, … ).
- 168
- Undefined Data Dictionary
The program or task has attempted to INCLUDE a format without access to a data dictionary.
- 169
- Format Corruption Detected
The program or task has attempted to INCLUDE:
- A format where only the format header record exists within the data dictionary.
- A format that contains a corrupt data element, one with an invalid combination of fixed attributes.
- 170
- Format Cannot Be DELETEd (OPEN LINK)
The program or task has attempted to DELETE a format that was softly INCLUDEd (i.e., INCLUDEd by an OPEN, OPT=“LINK”).
- 171
- Undefined Link Name
The program or task has attempted to OPEN a link that does not exist in the data dictionary.
- 172
- Cannot Process a Format/Data Name in the IOLIST of an OPEN LINK
The program or task has attempted to reference a format or data name in the IOLIST of a channel that was OPENed with OPT=“LINK”.
- 173
- Link Corruption Detected
The program or task has attempted to OPEN:
- A link where only the link header record exists within the data dictionary.
- A link that contains corrupt sort information.
- 174
- Invalid Secondary Key Definition
The program or task has attempted to OPEN a link with an invalid sort definition.
- 175
- Cannot Create Format Alias from Another Alias
The program or task has attempted to create a format alias from another format alias.
- 176
- Global/Local Mismatch for Format Alias
The program or task has attempted to create a #format alias from a %format or a %format alias from a #format.
- 177
- Format Alias Already Exists
The program or task has attempted to create a format alias that has already been created.
- 178
- Invalid Format Alias
The program or task has attempted to create a format alias with the name of a format that already exists in the data dictionary.
- 179
- Illegal Link Reference in File Suffix Method
The program or task has attempted to OPEN a link that calls a file suffix method which references the link being OPENed.
From the Thoroughbred Basic Technical Appendices, version 8.9.1. Open this page in the PDF