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: CXCOBPCO 000007* LANGUAGE: COBOL 000008* PURPOSE: THIS EXAMPLE DEMONSTRATES A C++ MAIN CALLING A 000009* COBOL ROUTINE, WHICH TAKES A PARAMETER LIST. 000010* IT CONSISTS OF SAMPLE LIBRARY MEMBERS 000011* CXCOBPC, CXCOBPCO, AND CXCOBPRM. 000012* MVS - 000013* COMPILE: USE JCL PROVIDED SAMPLE.AUX(CXCOBPRM). 000014* LINK: USE JCL PROVIDED SAMPLE.AUX(CXCOBPRM). 000015* EXECUTE: USE JCL PROVIDED SAMPLE.AUX(CXCOBPRM). 000016* TSO - 000017* COMPILE: COBOL - USE COBOL COMPILER. 000018* C++ - LCXXC CXCOBPC 000019* LINK: ILCLINK W/ CONTROL CARDS IN SAMPLE.AUX(CXCOBPRM). 000020* EXECUTE: CALL.LOAD(CXCOBPRM) 000021* CMS - 000022* COMPILE: COBOL - USE COBOL COMPILER. 000023* C++ - LCXX CXCOBPC 000024* LINK: ILCLINK W/ CONTROL CARDS IN SAMPLE.AUX(CXCOBPRM). 000025* EXECUTE: CALL CXCOBPRM 000026* MISC NOTES: THE FOLLOWING LSCL102 MESSAGE CAN BE IGNORED: 000027* CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IGZEBST) 000028*----------------------------------------------------------------- 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++ PGM: MAINC ' WK-INDATA. 005110 DISPLAY 'RECEIVE CONTROL FROM C++ PGM: MAINC ' WK-OUTDATA. 005120 MOVE ' COBOL RECEIVING ' TO WK-OUTDATA. 005130 DISPLAY 'RECEIVE CONTROL FROM C++ PGM: MAINC ' WK-OUTDATA. 005140 EXIT. 005200 GOBACK.