Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


STUB

Use the STUB statement to add a DOS .EXE file to the beginning of the .EXE or .DLL file that you are creating.

STUB statement syntax
Read syntax diagramSkip visual syntax diagram>>-STUB--'filename'--------------------------------------------><
 

The linker searches for the file-name you specify as the stub in the following order:

  1. In the directory you specify, or in the current directory if you did not specify a path
  2. In the directories listed in the PATH environment variable

The stub function will be invoked whenever your .EXE or .DLL file is run under DOS. Typically, the stub displays the message that the program cannot run in DOS mode, and ends the program.

If you do not use the STUB statement, the linker adds its own standard stub for this purpose.

The following example adds the DOS .EXE file STOPIT.EXE to the beginning of the file that you are creating:

STUB 'STOPIT.EXE'

Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)