/*-------------------------------------------------------------------+
|                 Copyright (c) 1995, SAS Institute Inc.             |
|                   Unpublished - All Rights Reserved                |
|                      S A S / C   S A M P L E                       |
|                                                                    |
|          NAME: COBCXXC                                             |
|      LANGUAGE: C++                                                 |
|       PURPOSE: THIS EXAMPLE DEMONSTRATES CALLING C++ FUNCTIONS     |
|                FROM COBOL, WHICH THEN CALL OTHER C++ FUNCTIONS.    |
|                IT CONSISTS OF SAMPLE LIBRARY MEMBERS               |
|                COBCXXC, COBCXXCO, AND COBOLCXX.                    |
|    MVS -                                                           |
|       COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(COBOLCXX).           |
|          LINK: USE JCL PROVIDED IN SAMPLE.AUX(COBOLCXX).           |
|       EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(COBOLCXX).           |
|    TSO -                                                           |
|       COMPILE: COBOL - USE COBOL COMPILER.                         |
|                C++ - LCXX COBCXXC W/ INDEP,SN(CSTUB) OPTIONS.      |
|          LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(COBOLCXX)|
|       EXECUTE: CALL .LOAD(COBOLCXX)                        |
|    CMS -                                                           |
|       COMPILE: COBOL - USE COBOL COMPILER.                         |
|                C++ - LCXX COBCXXC W/ INDEP,SN(CSTUB) OPTIONS.      |
|          LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(COBOLCXX)|
|       EXECUTE: CALL COBOLCXX                                       |
|    MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED:       |
|              CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IGZEBST)  |
|-------------------------------------------------------------------*/
#include 

void nextcxxfunc()
  {
cout << "nextcxxfunc() has been called" << endl;
  }

void extern "C" cprog1()
  {
cout << "cprog1 has been called" << endl;
nextcxxfunc();
  }

void extern "C" cprog2()
  {
cout << "cprog2 has been called" << endl;
nextcxxfunc();
  }

void extern "C" cprog3()
  {
cout << "cprog3 has been called" << endl;
nextcxxfunc();
  }