/*-------------------------------------------------------------------+
|                Copyright (c) 1995, SAS Institute Inc.              |
|                  Unpublished - All Rights Reserved                 |
|                      S A S / C   S A M P L E                       |
|                                                                    |
|         NAME: COBCXPC                                              |
|     LANGUAGE: C++                                                  |
|      PURPOSE: This example demonstrates calling a C++ function     |
|               with a parameter list from COBOL, which then calls   |
|               another C++ function. It consists of sample library  |
|               members:                                             |
|                COBCXPC, COBCXPCO, and COBCXXPM.                    |
|   MVS -                                                            |
|      COMPILE: Use JCL provided in SAMPLE.AUX(COBCXXPM).            |
|         LINK: Use JCL provided in SAMPLE.AUX(COBCXXPM).            |
|      EXECUTE: Use JCL provided in SAMPLE.AUX(COBCXXPM).            |
|   TSO -                                                            |
|      COMPILE: COBOL - use COBOL compiler.                          |
|               C++ - LCXXC with INDEP,SN(CPROG) options.            |
|         LINK: ILCLINK, using control cards in SAMPLE.AUX(COBCXXPM).|
|      EXECUTE: CALL .LOAD(COBCXXPM)                         |
|   CMS -                                                            |
|      COMPILE: COBOL - use COBOL compiler.                          |
|               C++ - LCXX with INDEP,SN(CPROG) options.             |
|         LINK: ILCLINK, using control cards in SAMPLE.AUX(COBCXXPM).|
|      EXECUTE: CALL COBCXXPM                                        |
|   MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED:        |
|             CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IGZEBST)   |
+-------------------------------------------------------------------*/
#include 

void func2();

void extern "C" cxxprog(char comment(|20|) )
{
  char comment1(|20|) = "HELLO, FROM C++! ";
  cout << "comment = "<< comment << endl;
  cout << "comment1 = "<< comment1 << endl;
  func2();
}

void func2()
{
 cout << "hello from a second C++ function" << endl;
}