PLI2CXX:
   PROCEDURE  OPTIONS(MAIN);
 /*-------------------------------------------------------------------*/
 /*                Copyright (c) 1995, SAS Institute Inc.             */
 /*                  Unpublished - All Rights Reserved                */
 /*                    S A S / C   S A M P L E                        */
 /*                                                                   */
 /*       NAME: PLI2CXXP                                              */
 /*   LANGUAGE: PLI                                                   */
 /*    PURPOSE: THIS EXAMPLE DEMONSTRATES A PLI PROGRAM CALLING       */
 /*             A C++ FUNCTION.                                       */
 /*             IT CONSISTS OF SAMPLE LIBRARY MEMBERS                 */
 /*             PLI2CXXC, PLI2CXXP, AND PLI2CXX                       */
 /* MVS -                                                             */
 /*    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CXX).              */
 /*       LINK: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CXX).              */
 /*    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CXX).              */
 /* TSO -                                                             */
 /*    COMPILE: PLI - USE PLI COMPILER.                               */
 /*             C++ - LCXXC PLI2CXXC USING SN(CXXPROG),INDEP OPTIONS. */
 /*       LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PLI2CXX).  */
 /*    EXECUTE: CALL .LOAD(PLI2CXX)                           */
 /* CMS -                                                             */
 /*    COMPILE: PLI - USE PLI COMPILER.                               */
 /*             C++ - LCXX PLI2CXXC USING SN(CXXPROG),INDEP OPTIONS.  */
 /*        LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PLI2CXX). */
 /*     EXECUTE: CALL PLI2CXX                                         */
 /*  MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED:        */
 /*    Warning: Can't open file during autocall: SYSLIB(IBMBPIRA)     */
 /*    Warning: Can't open file during autocall: SYSLIB(IBMBPIRB)     */
 /*    Warning: Can't open file during autocall: SYSLIB(IBMBPIRC)     */
 /*    Warning: Can't open file during autocall: SYSLIB(PLIMAIN)      */
 /*    Warning: Can't open file during autocall: SYSLIB(IBMBPRCA)     */
 /*-------------------------------------------------------------------*/

 DCL CPROG       ENTRY EXTERNAL OPTIONS(ASM,INTER);

 DCL CFMWK       ENTRY EXTERNAL OPTIONS(ASM,INTER); /* create frmk */
 DCL DCFMWK      ENTRY EXTERNAL OPTIONS(ASM,INTER);
 DCL C_TOKEN     FIXED BIN(31);
 DCL ILC_OPTS    FIXED BIN(31);
 DCL C_ERR       FIXED BIN(31);

     ILC_OPTS = 0;
     CALL CFMWK('PLI.','.',ILC_OPTS,C_TOKEN);

     CALL CPROG();

     CALL DCFMWK(C_TOKEN,C_ERR);
 END PLI2CXX;