Microsoft KB Archive/39189: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (X010 moved page Microsoft KB Archive/Q39189 to Microsoft KB Archive/39189 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
 
(No difference)

Latest revision as of 18:22, 12 August 2020

How to CALL Subprograms at Desired ENTRY Points in COBOL 3.0

PSS ID Number: Q39189 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: In Microsoft COBOL Version 3.0 or 3.0a, the ENTRY statement defines alternate entry points into a CALLed subprogram. An example of this is provided below, where the CALLed program starts execution after the ENTRY statement, skipping the first DISPLAY statement. To use the ENTRY statement, you must compile with the VSC2 and OSVS directives. Without these directives, the COBOL Version 3.0 or 3.0a compiler gives the following error: ‘.’ MISSING The entry point itself must be a string literal, as shown in the example below. Compile and LINK the programs below with the default settings. The calling program is as follows: $SET ans85 vsc2 osvs PROCEDURE DIVISION. Main-line. CALL “point”. STOP RUN. The called subprogram is as follows: $SET ans85 vsc2 osvs IDENTIFICATION DIVISION. PROGRAM-ID. CALLED-ONE. PROCEDURE DIVISION. Main-line. DISPLAY “hi”. ENTRY “point”. DISPLAY “lo”. EXIT PROGRAM.

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