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: C2COBPCO
000007*    LANGUAGE: COBOL
000008*     PURPOSE: THIS EXAMPLE DEMONSTRATES A C MAIN CALLING A
000009*              COBOL ROUTINE THAT TAKES A PARAMETER LIST.
000010*              IT CONSISTS OF SAMPLE LIBRARY MEMBERS
000011*              C2COBPC, C2COBPCO, AND C2COBPRM.
000012*  MVS -
000013*     COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(C2COBPRM).
000014*        LINK: USE JCL PROVIDED IN SAMPLE.AUX(C2COBPRM).
000015*     EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(C2COBPRM).
000016*  TSO -
000017*     COMPILE: COBOL - USE COBOL COMPILER.
000018*              C - LC370C C2COBPC
000019*        LINK: ILCLINK W/ CONTROL CARDS IN SAMPLE.AUX(C2COBPRM).
000020*     EXECUTE: CALL .LOAD(C2COBPRM)
000021*  CMS -
000022*     COMPILE: COBOL - USE COBOL COMPILER.
000023*              C - LC370 C2COBPC
000024*         LINK: ILCLINK W/ CONTROL CARDS IN SAMPLE.AUX(C2COBPRM).
000025*      EXECUTE: CALL C2COBPRM.
000026*   MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED:
000027*             CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IGZEBST)
000028*             CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(COBPROG)
000029*-----------------------------------------------------------------
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. COBPROG.
001200 ENVIRONMENT DIVISION.
001600 INPUT-OUTPUT SECTION.
001700 FILE-CONTROL.
001800 I-O-CONTROL.
001900
002000 DATA DIVISION.
002100 FILE SECTION.
002200
002300 WORKING-STORAGE SECTION.
004300 LINKAGE SECTION.
004400 01 WK-INDATA   PIC X(30).
004500 01 WK-OUTDATA  PIC X(30).
004600
004700 PROCEDURE DIVISION USING WK-INDATA WK-OUTDATA.
004800 100-START-CODE.
005000
005100     DISPLAY 'RECEIVE CONTROL FROM C PROGRAM: MAINC ' WK-INDATA.
005110     DISPLAY 'RECEIVE CONTROL FROM C PROGRAM: MAINC ' WK-OUTDATA.
005120     MOVE ' COBOL RECEIVING ' TO WK-OUTDATA.
005130     DISPLAY 'RECEIVE CONTROL FROM C PROGRAM: MAINC ' WK-OUTDATA.
005140     EXIT.
005200     GOBACK.