< Shark Expression
Home Shark Reference Guide Shark Expressions Shark Commands Shark Functions The Configuration File Write Editor Contact Menu

Error Messages:

1. Invalid variable type found when executing an expression.

Check the types of the fields or variables used in the command. Use LIST STRUCTURE and LIST MEMORY.

2. Variable not found.

A variable name has not been defined. Either is has been misspelled in this command or in an earlier one in which it was defined, or it has been defined only in a command that had a macro in it.

3. Illegal expression.

Shark cannot understand what you want computed. Try rewriting the expression to overcome your problem.

4. Missing the second operand in an expression.

A field or variable named in the command does not exist, or you have not written the command properly.

5. File not found.

Either the file does not exist, or Shark is looking for it in the wrong place (do FILES LIST to see where SharkBase expects files to be), or you have too many files open already to allow another file to be opened. For all versions of Shark, the CONFIG.SYS file in the root directory of your boot disk must contain the line FILES=<n> where <n> is 20 or more. For Shark, <n> can be greater than 20 if the same line is in both the CONFIG.SYS file & in Shark's SET file.

6. Index file not found.

Shark cannot open the index file you want to open. See explanation under Error 5.

7. Record specified is out of range.

You are trying to reach a record with a number greater than the number of records in the file. If you are just trying to more within art indexed file, you should reindex. It's likely that your file was packed without updating the index, or the index was created for another data file.

8. Error in reading file.

A data or index tile is corrupt. Shark automatically fixes most problems with data files, but all indexes for that tile must then he recreated. If the data file is okay, check each of the indexes in turn and recreate any that are corrupt. (Turning off or rebooting the computer while an indexed data file is in use almost guarantees file corruption.)

9. Index file is not functioning.

An error has occurred that has so affected Shark's internal memory that indexing does not work. QUIT Shark immediately and try again.

10. Missing 'TO' in command.

Numerous commands. such as INDEX, COPY file, TOTAL, etc, require a TO <file> clause, which you have0 omitted. (For some of these, "TO" is optional, but <file> is always required.)

11. 128 memory variables have been used.

Too many variable names have been defined. Programmers can usually use matrices and or data files to overcome any difficulty with this limit.

12. Missing or mismatched string delimiter.

Quotation marks must be the same on both ends of a string with no other occurrences within the string. "Sam's Foods' is illegal; the correct form is "Sam's Foods".

13. No space is left in a control stack.

Shark keeps track of hundreds of items at all times, using what are called "stacks." If the stacks fill up during complex operations, you may have to QUIT and try Shark again.

14. No valid command was found.

You may have misspelled a command.

15. Invalid nesting of DO WHILE or IF statements.

All structures must be "balanced"; that is, every DO WHILE requires an ENDDO, etc. Every structure inside another structure must be similarly balanced. A helpful hint: use the WRITE command on the program and press Alt-F to format the file with all structure indented three spaces. If the last END command in the program does not start in column zero, with an indented line above, you know you have an unbalanced structure. if this first test is passed, double-check that every END command has a matching structure command above it at the same level of indenting.

16. File pointer must he between 1 and 10.

SELECT <n> and #<n> must reference file numbers as given in the message above. The number must be in digits; a variable is not permitted.

17. Strings cannot be larger than 255 characters.

An attempt was made to create a string longer than 255 characters.

l8. Missing parenthesis ' ) ' or '( ' in expression.

Every "{" in an expression must have a matching ")" in the correct place.

19. Invalid CASE construction . {Problem may he in PROCEDURE or do module.)

This may result from several errors: A condition may be invalid, you may have omitted the DO CASE line, or you may have an error in a DO module called from the current program just before the CASE line was encountered. Cheek your program logic carefully.

20. Must be numeric argument .

In a function, a numeric value was expected. In a REPORT form, an attempt has been made to use a totalling PICTURE on a non-numeric expression, or a PICTURE contains comma.

21. Invalid variable or constant.

See error 2.

22. Program not found or too many files opsn.

See error 5.

23. Program is too large for memory.

Reduce the sine of the current module by putting part of it into a subroutine. It's also possible to reduce the size of a compiled program by compiling it with SET LINE OFF; however then there will be no line numbers for error tracking.

24. Invalid nesting of DO or RETURN statements. (Problem may be in DO module).

See Error 19. A return cannot be executed from a main module and a module cannot DO itself, nor a module that calls it, either directly or indirectly.

25. The PROCEDURE mast he defined in this module if it is to he PERFORMed.

PERFORM can only execute procedures defined in the current module. If it is defined but not recognized, check for omission of an ENDTEXT if a TEXT was started.

26. Disk full or error in writing data to disk.

Most versions of DOS reports more space available on disk than is really available because: disk space is allocated in clusters which leave a certain amount of unusable slack for each file. Therefore, space may not be available even if DIR shows some space left. In addition a bad sector or other DOS error may be reported with this message.

27. File must be indexed for this command.

Commands like POST, UPDATE and FIND require an index to operate.

28. Missing WITH in REPLACE command.

Either the word WITH is missing, or the WITH expression is invalid. Remember that fields from any file other than the selected file must be referenced with #<n> .

29. Only 10 expressions can be used in the SUM command.

SUM, AVERAGE, MAX and MIN commands all allow an expression list, but no more than 10 expressions are permitted.

30. Missing FOR clause of LOCATE or CONTINUE command.

FOR must be part of the LOCATE command, and cannot be in a macro. Once the LOCATE FOR has been executed, the FOR clause is kept in memory and used for any subsequent CONTINUE command. If CONTINUE is attempted before any LOCATE FOR, this error will result.

31. Insufficient space to do the sort.

32. Improper syntax for dimension variables.

The variable is not dimensioned, or the wrong number of dimensions is given, or a dimension is either less than 1 or greater than the number of elements declared in the DIM statement.

33. Internal macro space has been exceeded.

34. Not enough memory for a buffer to be made.

Programs, data tiles and indexes all take up memory area. If insufficient memory remains to store something Shark requires, this message is given. Reduce the number of files or size of program.

35. No more than 32 external memory variables are allowed.

Matrix variables are stored in "high memory" instead of the norrna] variable storage area: No more than 32 matrices can be created.

36. This program must he re-compiled.

Either the program was compiled with a different version of SharkBase or your EXE and MSG files do not match.

37. This program exceeds the available program memory.

38. A data file must be in USE for this command.

Execute STATUS command to see what data files are open. You may be in a different SELECT area than you expect, or you may have inadvertently closed one or more data files with a CLEAR or USE command, or did an APPEND FROM or POST FROM command from an open data file (these commands close the FROM file automatically).

39. Missing "ON" in this command.

Either the word ON is missing, or the ON expression is invalid.

40. CREATE must be followed by a file name.

Name the data file you want to create.

41. Two coordinates must be specified.

Commands like @ SAY, @ GET, and CURSOR require both the row and column numbers.

42. Screen coordinates are out of range.

Screen coordinates are 0,0,24,79, but you have specified a row or column number for screen coordinates that are outside those limits. If you are using variables to define your coordinates, check their values; negatives are obviously illegal.

43. This command is not authorized for use by end users.

Some commands are reserved for developers. Avoid any command giving this message.

44. Index is outside the range of a buffer or matrix.

44. This matrix variable is already defined.

45. Not enough memory for this matrix to be defined.

46. Index is outside the range of a buffer or matrix.

"Index," in this case, refers to the number n between the brackets [n] of the matrix reference. Each index must be greater than 0 and no greater than the number of elements called for in the DIM command.

47. Sequential file numbers must be between 1 and 4.

The sequential file functions ROPEN(, WOPEN(, READ(, WRITE(, etc, refer to file 1 by default, or can specifically reference any file number from 1 through 4.

48. The index expression cannot exceed 60 characters.

49. Date format cannot exceed 8 characters in length.

SET DATE TO must be any of the following: "MMDDYY", "DDMMMYY", "YYMMDD", "MMDDYYYY", "DDMMYYYY", "YYYYMMDD", but you have attempted a different format.

50. Indexes for field vectors must be 1 to number of fields in file.

In referencing fields by treating a data file as a one-dimension matrix, you must not reference a field number less than 1 nor greater than the number of fields in the file.

51. Illegal use of macro.

Not all commands can use a macro, and the command itself cannot be in a macro.

52. Maximum number or fields must in range 128 to 1000.

The FIELDS=<n> command in the SET tile must set <n> within the above range.

53. The index file switched to is not open.

SET INDEX TO <n> can be used only when at least <n> index files are open on the current data file.

54. Screens can be defined from 1 to 4.

You have attempted to direct screen output, or move a screen to or from a screen numbered less than 1 or greater than 4.

55. Invalid window coordinates.

Screen coordinates are 0,0,24,79, (i.e. "row,column,row,column") but you have tried to set up a window with one of its corners outside those limits, or have inverted some of the numbers. The first position must be less than or equal to the third, and the second first must be less than or equal to the fourth. (If you are defining the window with only the top and bottom row, the top row must be less than or equal to the bottom row.) If you are using variables to define your coordinates, check their values; negatives are obviously not permitted.

56. Screen library is not open.

You cannot reference a library volume unless a library is open. Either open a library or do not use a period before the file name you are using with TEXT or WRITE.

57. Missing = sign.

Shark has been "fooled" into thinking you want to write an assignment statement. You may have inadvertently typed a "[" after a command.

58. Bit position parameter is out of range.

BIT, SET(, and RESET( functions number bits starting with 1 at the leftmost bit of a string, with 8 bits per character. You have tried to reference a bit less than 1 or greater than 8.

59. Invalid field or :field reference in ON FIELD; check TEXT.

This error usually results from misspelling the field or variable name either in the TEXT, or failing to add the redirection number for a field that is not in the current data file. For example, if SELECT 1 and ADDRESS is a field in file 2, all references to that field in both the TEXT and the ON FIELD should be NAME#2.

60. Comand not found or not enough space to execute. (See: MEMORY=}

The RUN command either cannot find the program you want to run under SharkBase (its name or directory may not he correct) or there is not enough memory available after Shark was loaded to run that command. In SharkBase, you can reduce the amount of memory demanded by Shark with the MEMORY= directive in your VPI.SET or VPIN.SET file.

61. Network must use D0S 3.1 or greater.

SharkBase Network Edition cannot go into network mode unless your version of DOS supports NETBIOS networking conventions first introduced by Microsoft in PC-DOS and MS-DOS version 3.1, or PC-MOS.

62. Read-only files cannot be changed.

If changes must he made to the current file, reopen it (with indexes as required) in WRITE or LOCK mode.

63. [ ] file locked.

The [file] named in the message is in use by another user. Consider opening the file with a lower level of access mode, or try again later.

64. Record locked in file [ ].

You cannot access a record in the current data file (opened in SHARE mode) because it is locked by another user. Well-designed sharing applications ensure that the record will be locked for only a few seconds at most, so try again in a few seconds.

65. Index error. Reduce the key size to index this file.

The maximum size of a string used for an index key is 60 characters. Most users will find few or any situations in which an index key this long is actually required.

66. Format lines in a TEXT command exceeded 64 {clear with CLEAR GETS}.

Shark's Get Table has room for up to 64 format pictures, one for each editing window or output macro allowed in the table. Perhaps you have format pictures defined for macros that are not present in the TEXT.

67. Only 30 fields can he used in the REPORT command.

68. Invalid file operation due to sharing violation.

The FIELDS line of the report FORM file can contain up to 30 expressions, each of which results in creation of one column of the report. If you need more than 30 columns, consider writing a program to print the report, or try combining two or more string columns into a single expression for the FIELDS line.

69. Memory variable space exceeds limit.

Shark allocates a specific amount of memory to accommodate the contents of all memory and temporary variables. Even though you have created fewer than the maximum permitted number of variables. they take too many bytes of memory to be stored at the present time. It is not necessary to RELEASE any variables; it is better to find long strings that do not have to be kept in memory, and redefine them as ' ', which takes only 2 bytes to store. If all the variables are required, consider creating a data file or character matrix in which you can store very long strings.

70. Expression is too complex; requires too many temporary variables.

Most expressions can be simplified by pulling out portions in parentheses and evaluating them into separate memory variables. This makes programs not only easier to understand and debug, but is actually as fast or faster than the more complex, single-line expressions.

7l. Invalid nesting; ENDDO implies a DO WHILE.

All structures must be "balanced"; that is, every DO WHILE requires an ENDDO, every IF requires an ENDIF, etc. Every structure inside another structure must be similarly balanced. A helpful hint: use the WRITE command on the program and press Alt-F to format the file with all structure indented three spaces. If the last END~ command in the program does not start in column zero, with an indented line above, you know you have an unbalanced structure. If this first test is passed, double-check that every END command has a matching structure command above it at the same level of indenting.

72. Invalid nesting; ENDCASE implies a DO CASE.

Sec note under error 7l.

73. Invalid nesting; ENDIF implies an IF

See note under error 71.

74. Invalid nesting; ENDPROC implies a PROCEDURE.

Sec note under error 7l.

75. Invalid nesting; ENDREPEAT implies a REPEAT.

See note under error 71.

76. Invalid nesting; ENDON implies s ON ESCAPE, ON ERROR, or ON FIELD.

See note under error 71.

77. Expecting ERDTEXT command.

See note under error 71.

78. Expecting EHDPHE command.

See note under error 71.

79. CASE or OTHERWISE encountered with no corresponding D0 CASE command.

See note under error 71.

80. ELSE commend encountered with no corresponding IF command.

See note under error 71.

81. FIELD command encountered with no corresponding ON FIELD commend.

See note under error 71.

82. LOOP or BREAK encountered with no D0 WHILE or REPEAT commend .

LOOP is permitted only inside a DO WHILE loop, while BREAK is permitted inside either a DO WHILE or REPEAT loop.

83. Not enough memory for REPORT {try calling from a DO module]

The report command is actually a mini-program which is compiled and run on the fly. This requires a considerable amount of memory, which may not he available in a large program, or one with many data and index files open. The solution is to put the report command in a small program called as a subroutine from the main program.

84. Unable to create a file .

Most common reasons that a file cannot be created are that the directory or drive on which creation is to take place does not exist, the directory is full, or the drive is full. in network operations, attempting to create a ?le when another of the same name is in use by another user also returns this error.

85. Compiled expression too long to save. Simplify.

In executing commands where a compiled expression is stored for future use in the memory structure of a data-file or index-?le structure, Shark checks that the compiled form of the expression will fit in the buffer area provided. This message advises the user that an index, scope, relation, or filter expression is too complex to store. Some string functions such as SUBSTRING( or ${ use many bytes to compile, so LEFT( or RIGHT( are preferred if possible.

86. Missing file name in command.

Commands like WRITE only have meaning when a file name is specified.

87. Division by zero. Permitted only if SET DIVZERO ON [default] -

Mathematical purists do not permit a number to be divided by zero, since the result is infinity. Many business users, however, prefer to consider the result of division by zero to he zero; this is what results when SET DIVZERO ON.

88. Index reference by number must he in range 1 to number of active indexes.

SET INDEX TO <n> can be used 0nly when at least <n> index files are open on the current data file.

89. Minimum window is 50 characters wide and 5 lines deep for EDIT or APPEND.

EDIT and APPEND can be executed in a window, provided it is large enough to accommodate the necessary messages; minimum size is given above.

90. Too many fields requested. Exit Shark, increase FIELD5= in VPI.SET file

Not enough room in the FIELDS table to accommodate all the fields of all the open data tiles. See APPENDIX A for explanation of how field structures are stored in the FIELDS table.

96. DO nesting level exceeds limit.

Subroutines can call subroutines to a maximum of eight levels; you have exceeded this limit

97. SharkBase workspace full. [Try breaking program into modules.)

There is not enough memory available in low memory to execute the current program. Reduce the size of the current module by putting part of it into a subroutine, or reduce the number of data and index files. It is also possible to reduce the size of a compiled program by compiling it with SET LINE OFF.

98. Keyword following ON not recognized.

The ON command must be followed by one of these keywords: ERROR, ESCAPE, or FIELD.

99. SYSTEM ERROR, file access code invalid.

The only valid network access codes are: READ, WRITE, SHARE, and LOCK.

100. BINSPACE= request cannot be greater than 32.

Shark allows memory to be allocated for loading BIN files, which can then be execute with the CALL command. Set BINSPACE in the SET file to a number of K from 1 to 32 (do not use the "K").

101. Unable to satisfy BINSPACE= request.

Not enough memory available to allocate the amount of memory you are requesting. BINSPACE. Either reduce the BINSPACE= request or the MEMORY= request in the SET file.

102. BINLOAD failed! Unable to open BIN file.

The BIN file either does not exist, or cannot be found for same reasons discussed with Error 5.

103. Cannot BINLOAD blocks larger than 32K.

Maximum size of any BIN file is 32K.

104. BINSPACE in high memory cannot satisfy LOAD request.

One or more currently loaded BlN tiles must be BINUNLOADed, or the BINSPACE= command must be increased.

105. A maximum of eight BIN files can be BINLOADed at once.

BINUNLOAD one or more BIN flies from the BINSPACE.

l06. BINSPACE= must be run in SET file if BINLOAD or CALL commands are required.

Change your SET file to include a BINSPACE= command, exit SharkBase and by again.

107. CALL failed! Memory variable not recognized.

The CALL command referenced a variable that does not exist.

108. CALL failed. Conmand not recognized.

The BIN file called is not loaded.

109. Drive not ready.

A floppy drive door is probably open, or no floppy is in drive.

11O. Attempt to write on protected diskette.

Floppy disks have write-protect tabs or sliders. Do not try to change a write-protected floppy.

111. FAT error - disk may not be formatted.

If disk is not formatted, format it. If it is formatted, it may be corrupt, and may require repair with a disc utility.

112. DOS reports critical error .

Check floppy drive or printer. A DOS error has occurred that has no specific Shark error message.

113. To ZAP, PACK, or REINDEX on a network files must be opened LOCK.

114. Current record not found in master index.