Microsoft KB Archive/40153

From BetaArchive Wiki

LITLINK Directive Required When Calling Non-COBOL Procedures

PSS ID Number: Q40153 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: The COBOL Version 3.0 compiler directive, LITLINK, must be used if a COBOL Version 3.0 program calls a non-COBOL procedure whose name does not begin with an underscore (_) character. When you use the LITLINK compiler directive, it causes the compiler to declare the literals in all CALL “Literal” statements as public symbols, causing them to be resolved at link time (with static linking) rather than at run time (with dynamic linking). With NOLITLINK, the compiler does this only for literals that begin with a double-underscore character, as in the following CALL: CALL "__subprogram". The COBOL compiler defaults to the NOLITLINK directive, which means that dynamic (run-time) linking is the default (unless your CALL literals begin with a double underscore).

More Information: There are three places where you can specify compiler directives; they are as follows: 1. In the COBOL compiler command line 2. With the $set command (the $ character must be in column 7) 3. In the COBOL.DIR file The above information is based on information from Page 2-32 of the “Getting Started” section in “Microsoft COBOL Version 3.0: Operating Guide.”

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