000001**----------------------------------------------------------------
000002*                 COPYRIGHT (C) 1995, SAS INSTITUTE INC.
000003*                   UNPUBLISHED - ALL RIGHTS RESERVED
000004*                      S A S / C   S A M P L E
000005*
000006*         NAME: COBCXPCO
000007*     LANGUAGE: COBOL
000008*      PURPOSE: THIS EXAMPLE DEMONSTRATES CALLING A C++ FUNCTION
000009*               WITH A PARAMETER LIST FROM COBOL, WHICH THEN CALLS
000010*               ANOTHER C++ FUNCTION. IT CONSISTS OF SAMPLE
000011*               LIBRARY MEMBERS: COBCXPC,COBCXPCO, AND COBCXXPM.
000012*   MVS -
000013*      COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(COBCXXPM).
000014*         LINK: USE JCL PROVIDED IN SAMPLE.AUX(COBCXXPM).
000015*      EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(COBCXXPM).
000016*   TSO -
000017*      COMPILE: COBOL - USE COBOL COMPILER.
000018*               C++ - LCXXC WITH INDEP,SN(CPROG) OPTIONS.
000019*         LINK: ILCLINK. USE CONTROL CARDS IN SAMPLE.AUX(COBCXXPM)
000020*      EXECUTE: CALL .LOAD(COBCXXPM)
000021*   CMS -
000022*      COMPILE: COBOL - USE COBOL COMPILER.
000023*               C++ - LCXX WITH INDEP,SN(CPROG) OPTIONS.
000024*         LINK: ILCLINK. USE CONTROL CARDS IN SAMPLE.AUX(COBCXXPM)
000025*      EXECUTE: CALL COBCXXPM
000026*   MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED:
000027*             CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IGZEBST)
000028*-----------------------------------------------------------------
000029
000030
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID.                COBMAINC.
000300 AUTHOR.                    XXX.
000400 DATE-WRITTEN.              27 03 92.
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER.           IBM-370.
000800 OBJECT-COMPUTER.           IBM-370.
001200 DATA DIVISION.
001300 WORKING-STORAGE SECTION.
001350  77  COMMENT               PIC X(20) VALUE 'HELLO, FROM COBOL'.
001400  01  WS-C-PARAM.
001500      03  C-TOKEN           PIC 9(09) COMP.
001600      03  C-OPTIONS         PIC X(07) VALUE SPACES.
001700      03  ILC-OPTIONS       PIC 9(09) COMP VALUE 0.
001800      03  COBOL-NAME        PIC X(06) VALUE 'COBOL'.
001900      03  DCFMWK-ERR-FLAG   PIC 9(09) COMP.
002000 PROCEDURE DIVISION.
002100            DISPLAY COMMENT.
002200            CALL 'CFMWK' USING
002300                               COBOL-NAME
002400                               C-OPTIONS
002500                               ILC-OPTIONS
002600                               C-TOKEN.
002800            CALL 'CXXPROG' USING COMMENT.
003000            CALL 'DCFMWK' USING
003100                              C-TOKEN
003200                              DCFMWK-ERR-FLAG.
003300            DISPLAY COMMENT.
003600            STOP RUN.