PLI2CXPRM:
   PROCEDURE  OPTIONS(MAIN);
 /*-------------------------------------------------------------------*/
 /*                Copyright (c) 1995, SAS Institute Inc.             */
 /*                  Unpublished - All Rights Reserved                */
 /*                    S A S / C   S A M P L E                        */
 /*                                                                   */
 /*       NAME: PLI2CXPP                                              */
 /*   LANGUAGE: PLI                                                   */
 /*    PURPOSE: THIS EXAMPLE DEMONSTRATES A PLI PROGRAM CALLING       */
 /*             A C++ FUNCTION, WHICH TAKES A PARAMETER LIST.         */
 /*             IT CONSISTS OF SAMPLE LIBRARY MEMBERS                 */
 /*             PLI2CXPC, PPLI2CXPP, AND PLI2CXPM.                    */
 /* MVS -                                                             */
 /*    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CXPM).             */
 /*       LINK: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CXPM).             */
 /*    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CXPM).             */
 /* TSO -                                                             */
 /*    COMPILE: PLI - USE PLI COMPILER.                               */
 /*             C++ - LCXXC PLI2CXPC USING SN(CXXPROG),INDEP OPTIONS. */
 /*       LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PLI2CXPM). */
 /*    EXECUTE: CALL .LOAD(PLI2CXPM)                          */
 /* CMS -                                                             */
 /*    COMPILE: PLI - USE PLI COMPILER.                               */
 /*             C++ - LCXX PLI2CXPC USING SN(CXXPROG),INDEP OPTIONS.  */
 /*        LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PLI2CXPM).*/
 /*     EXECUTE: CALL PLI2CXPM                                        */
 /*  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 CPARMS      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);

 DCL PARM1     CHAR(30);


     parm1 = 'PL/I PARM PASSED to C '||' '; /* pad with null */

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

     CALL CPARMS(PARM1);

     CALL DCFMWK(C_TOKEN,C_ERR);
 END PLI2CXPRM;