/*-------------------------------------------------------------------+
|                Copyright (c) 1995, SAS Institute Inc.              |
|                  Unpublished - All Rights Reserved                 |
|                    S A S / C   S A M P L E                         |
|                                                                    |
|       NAME: CXXPLIPC                                               |
|   LANGUAGE: C++                                                    |
|    PURPOSE: THIS EXAMPLE DEMONSTRATES A C++ MAIN CALLING A         |
|             PLI ROUTINE, WHICH TAKES A PARAMETER LIST.             |
|             IT CONSISTS OF SAMPLE LIBRARY MEMBERS                  |
|             CXXPLIPC, CXXPLIPP, AND CXXPLIPM.                      |
| MVS -                                                              |
|    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(CXXPLIPM).              |
|       LINK: USE JCL PROVIDED IN SAMPLE.AUX(CXXPLIPM).              |
|    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(CXXPLIPM).              |
| TSO -                                                              |
|    COMPILE: PLI - USE PLI COMPILER.                                |
|             C++ - LCXX CXXPLIPC                                    |
|       LINK: ILCLINK w/ CONTROL CARDS IN SAMPLE.AUX(CXXPLIPM).      |
|    EXECUTE: CALL .LOAD(CXXPLIPM)                           |
| CMS -                                                              |
|    COMPILE: PLI - USE PLI COMPILER.                                |
|             C++ - LCXX CXXPLIPC                                    |
|        LINK: ILCLINK w/ CONTROL CARDS IN SAMPLE.AUX(CXXPLIPM).     |
|     EXECUTE: CALL CXXPLIPM                                         |
| 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 
 #include 
 #include 
   extern __pli void writer();
 main()
 {
   void *token;
   cout << "Starting in C++... calling PL/I" << endl;
     if (!(token = mkfmwk("PLI", ""))) exit(16);
     writer("Hello, PL/I world!");
     if (dlfmwk(token)) exit(8);
   return(0);
 }