Microsoft KB Archive/39237

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

“Failure to Load Program. Error: 198” Using CALL Full Path

PSS ID Number: Q39237 Article last modified on 04-20-1993

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

The information in this article applies to:
- Microsoft COBOL for MS-DOS and OS/2, versions 3.0 and 3.0a

Summary: If a full path name starting with the drive or root directory is used in a CALL statement, COBOL Version 3.0 will load the program into memory each time it is CALLed, thus using up memory. A CALLed subprogram should only be loaded from the disk the first time it is CALLed or the first time it is CALLed after a CANCEL. Subsequent calls should simply access the subprogram already in memory without loading another copy. Microsoft has confirmed this to be a problem in Version 3.0. This problem is corrected in COBOL Version 3.0a.

More Information: For a description of how CALL should behave see the “Microsoft COBOL Compiler Version 3.0: Language Reference Manual,” Page 10-37, General Rule 3 for the CALL statement. If the subprogram is large and/or is called multiple times, the following error message will be displayed after the subprogram has been loaded enough times to use up available memory: Failed to Load Program, Run Time Error Number: 198 If you have an ON OVERFLOW clause in your CALL statement, then that clause will execute instead of displaying the standard error message. This error does not occur if the subprogram is in a directory on your MS-DOS PATH and is CALLed without giving the full path in the CALL statement. The following CALL works multiple times without using up memory: CALL “SUBPROG1”. But the following CALL uses up memory after being called multiple times: CALL “C:”. The following are complete COBOL Version 3.0 programs that demonstrate the problem. They should be Compiled and LINKed with the default directives: CALLING PROGRAM: $set LITLINK PROCEDURE DIVISION. AGAIN. DISPLAY “INSIDE MAIN PROGRAM” AT 1001. CALL “C:”. GO TO AGAIN. STOP RUN. CALLED PROGRAM: PROCEDURE DIVISION. MAIN-PROCEDURE. DISPLAY “INSIDE PROG1” AT 2001. EXIT PROGRAM.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.