RUN CONTROL PROGRAM

RUN.COM is the runtime control program with two main functions.

Running a program: Invoke RUN.COM to run a program as follows:

RUN progname [parameter]...

Progname is the name of the .RUN compiled program file;
Parameter is one or more optional parameters which are required for the program which is to be run.

If RUN is invoked without a program name, the program displays the total number of bytes in memory which are available for the program to be run, together with any CALLed programs.

RUNTIME ERRORS

Certain conditions can arise during the running of the program which will generate an error. These conditions cannot be detected by the compiler at compile time.

These errors are of two types; Logic errors and File errors. In both cases, an error comment is displayed on the screen and the program is terminated. The format of the error comment is as follows.

COBOL12 Version 6.01 - progname Runtime Error nn - ABANDONED
Press any key ...

. nn is the two-digit error number

If the error is associated with a data file used by the program, the file path of the file concerned is also displayed on the following line.
The logic errors are as follows.

  1. Insufficient memory for this program, either to load the main program or a CALLed subprogram.

  2. The required program or CALLed program was not found.

  3. The program version (v) does not match the Run version. This implies that the compiler and runtime programs are incompatible.

  4. The referenced program is not in correct format. It is either not a valid .RUN file or the file has been corrupted.

  5. This error occurs when the program attempts to call more than ten simultaneous programs.

  6. An attempt has been made to call the current program, or a program which has called another program when control has not yet returned to it.

  7. An attempt has been made to cancel the current program, or a program which has called another program when control has not yet returned to it.

  8. A subscript or index adresses a location beyond the memory limits, or a reference modification lies outside the limits of the data item.

  9. There is no logical end to the last physical paragraph in the program, and the program flow has attempted to pass beyond it.

File errors indicated by the corresponding file status code of value 20 or greater. These are defined in the separate file description documentation. They may be trapped and processed within the program if required, by using the USE statement (qv).