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: COBCXXCO
000007*     LANGUAGE: COBOL
000008*      PURPOSE: THIS EXAMPLE DEMONSTRATES CALLING C++ FUNCTIONS
000009*               FROM COBOL, WHICH THEN CALL OTHER C++ FUNCTIONS.
000010*               IT CONSISTS OF SAMPLE LIBRARY MEMBERS
000011*               COBCXXC, COBCXXCO, AND COBOLCXX.
000012*   MVS -
000013*      COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(COBOLCXX).
000014*         LINK: USE JCL PROVIDED IN SAMPLE.AUX(COBOLCXX).
000015*      EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(COBOLCXX).
000016*   TSO -
000017*      COMPILE: COBOL - USE COBOL COMPILER.
000018*               C++ - LCXX COBCXXC W/ INDEP,SN(CSTUB) OPTIONS.
000020*         LINK: ILCLINK. USE CONTROL CARDS IN SAMPLE.AUX(COBOLCXX)
000021*      EXECUTE: CALL .LOAD(COBOLCXX)
000022*   CMS -
000023*      COMPILE: COBOL - USE COBOL COMPILER.
000024*               C++ - LCXX COBCXXC W/ INDEP,SN(CSTUB) OPTIONS.
000026*         LINK: ILCLINK. USE CONTROL CARDS IN SAMPLE.AUX(COBOLCXX)
000027*      EXECUTE: CALL COBOLCXX
000028*   MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED:
000029*             CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IGZEBST)
000030*-----------------------------------------------------------------
000100 IDENTIFICATION DIVISION.                                         00010000
000200 PROGRAM-ID.                COBMAINC.                             00020000
000300 AUTHOR.                    XXX                                   00030001
000400 DATE-WRITTEN.              18 06 93.                             00040001
000500 ENVIRONMENT DIVISION.                                            00050000
000600 CONFIGURATION SECTION.                                           00060000
000700 SOURCE-COMPUTER.           IBM-370.                              00070000
000800 OBJECT-COMPUTER.           IBM-370.                              00080000
001200 DATA DIVISION.                                                   00120000
001300 WORKING-STORAGE SECTION.                                         00130000
001400  01  WS-C-PARAM.                                                 00140000
001500      03  C-TOKEN           PIC 9(09) COMP.                       00150000
001600      03  C-OPTIONS         PIC X(07) VALUE SPACES.               00160000
001700      03  ILC-OPTIONS       PIC 9(09) COMP VALUE 0.               00170000
001800      03  COBOL-NAME        PIC X(06) VALUE 'COBOL'.              00180000
001900      03  DCFMWK-ERR-FLAG   PIC 9(09) COMP.                       00190000
002000 PROCEDURE DIVISION.                                              00200000
002100            CALL 'CFMWK' USING                                    00210004
002200                               COBOL-NAME                         00220004
002300                               C-OPTIONS                          00230004
002400                               ILC-OPTIONS                        00240004
002500                               C-TOKEN.                           00260004
002600            CALL 'CPROG1'.                                        00280001
002700            CALL 'CPROG2'.                                        00280001
002800            CALL 'CPROG3'.                                        00280001
002900            CALL 'DCFMWK' USING                                   00290004
003000                              C-TOKEN                             00300004
003100                              DCFMWK-ERR-FLAG.                    00310004
003500            STOP RUN.                                             00350001