PLI2CPRM:
   PROCEDURE  OPTIONS(MAIN);
 /*-------------------------------------------------------------------*/
 /*                Copyright (c) 1995, SAS Institute Inc.             */
 /*                  Unpublished - All Rights Reserved                */
 /*                    S A S / C   S A M P L E                        */
 /*                                                                   */
 /*       NAME: PLI2CPP                                               */
 /*   LANGUAGE: PLI                                                   */
 /*    PURPOSE: THIS EXAMPLE DEMONSTRATES A PLI PROGRAM CALLING       */
 /*             A C FUNCTION, WHICH TAKES A PARAMETER LIST.           */
 /*             IT CONSISTS OF SAMPLE LIBRARY MEMBERS                 */
 /*             PLI2CPC, PLI2CPP, AND PLI2CPRM.                       */
 /* MVS -                                                             */
 /*    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CPRM).             */
 /*       LINK: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CPRM).             */
 /*    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(PLI2CPRM).             */
 /* TSO -                                                             */
 /*    COMPILE: PLI - USE PLI COMPILER.                               */
 /*             C - LC370C PLI2CPC USING INDEP OPTION.                */
 /*       LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PLI2CPRM). */
 /*    EXECUTE: CALL .LOAD(PLI2CPRM)                          */
 /* CMS -                                                             */
 /*    COMPILE: PLI - USE PLI COMPILER.                               */
 /*             C - LC370 PLI2CPC USING INDEP OPTION.                 */
 /*        LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(PLI2CPRM).*/
 /*     EXECUTE: CALL PLI2CPRM                                        */
 /*-------------------------------------------------------------------*/

 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 PLI2CPRM;