/*-------------------------------------------------------------------+
|                Copyright (c) 1995, SAS Institute Inc.              |
|                  Unpublished - All Rights Reserved                 |
|                    S A S / C   S A M P L E                         |
|                                                                    |
|       NAME: CXX2PLIC                                               |
|   LANGUAGE: C++                                                    |
|    PURPOSE: THIS EXAMPLE DEMONSTRATES A C++ MAIN CALLING A         |
|             PLI ROUTINE.                                           |
|             IT CONSISTS OF SAMPLE LIBRARY MEMBERS                  |
|             CXX2PLIC, CXX2PLIP, AND CXX2PLI                        |
| MVS -                                                              |
|    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(CXX2PLI).               |
|       LINK: USE JCL PROVIDED IN SAMPLE.AUX(CXX2PLI).               |
|    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(CXX2PLI).               |
| TSO -                                                              |
|    COMPILE: PLI - USE PLI COMPILER.                                |
|             C++ - LCXXC CXX2PLIC w/ SN(CXXMAIN),NORENT OPTIONS     |
|       LINK: ILCLINK w/ CONTROL CARDS IN SAMPLE.AUX(CXX2PLI).       |
|    EXECUTE: CALL .LOAD(CXX2PLI)                            |
| CMS -                                                              |
|    COMPILE: PLI - USE PLI COMPILER.                                |
|             C++ - LCXX CXX2PLIC w/ SN(CXXMAIN),NORENT OPTIONS      |
|       LINK: ILCLINK w/ CONTROL CARDS IN SAMPLE.AUX(CXX2PLI).
|     EXECUTE: CALL CXX2PLI                                          |
| MISC NOTES: THE FOLLOWING LSCL102 MESSAGES CAN BE IGNORED:         |
| LSCL102 WARNING: CAN'T OPEN FILE DURING AUTOCALL: SYSLIB(IBMBPIRA) |
| LSCL102 WARNING: CAN'T OPEN FILE DURING AUTOCALL: SYSLIB(IBMBPIRB) |
| LSCL102 WARNING: CAN'T OPEN FILE DURING AUTOCALL: SYSLIB(IBMBPIRC) |
| LSCL102 WARNING: CAN'T OPEN FILE DURING AUTOCALL: SYSLIB(IBMBPRCA) |
| LSCL102 WARNING: CAN'T OPEN FILE DURING AUTOCALL: SYSLIB(PLISTART) |
| LSCL102 WARNING: CAN'T OPEN FILE DURING AUTOCALL: SYSLIB(WRITER)   |
+-------------------------------------------------------------------*/
 #include 
 #include 
 main()
 {
   void *token;
   extern __pli void writer();
     if (!(token = mkfmwk("PLI", ""))) exit(16);
     cout << "Starting in C++...calling PL/I" << endl;
     writer();
     if (dlfmwk(token)) exit(8);
   return(0);
 }