C ------------------------------------------------------------------ C Copyright (c) 1995, SAS Institute Inc. C Unpublished - All Rights Reserved C S A S / C S A M P L E C C NAME: FORTCXXF C LANGUAGE: FORTRAN C PURPOSE: THIS EXAMPLE DEMONSTRATES A C++ MAIN CALLING A C FORTRAN ROUTINE. C IT CONSISTS OF SAMPLE LIBRARY MEMBERS C FORTCXXC, FORTCXXF, AND FORTCXX. C MVS - C COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(FORTCXX). C LINK: USE JCL PROVIDED IN SAMPLE.AUX(FORTCXX). C EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(FORTCXX). C TSO - C COMPILE: FORTRAN - USE FORTRAN COMPILER. C C++ - LCXX FORTCXXC USING INDEP OPTION. C LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(FORTCXX). C EXECUTE: CALL.LOAD(FORTCXX) C CMS - C COMPILE: FORTRAN - USE FORTRAN COMPILER. C C++ - LCXX FORTCXXC USING INDEP OPTION. C LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(FORTCXX). C EXECUTE: CALL FORTCXX C MISC NOTES: THE FOLLOWING LSCL102 MESSAGES CAN BE IGNORED: C WARNING: CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(IFYVINTE) C WARNING: CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(VFEE#) C WARNING: CAN'T OPEN FILE DURING AUTOCALL: DDN:SYSLIB(VFES#) C ------------------------------------------------------------------- C C FORTRAN MAIN routine C PROGRAM FORPRG INTEGER*4 TOKEN, ERR CALL CFMWK('FORTRAN.', '.', 0, TOKEN) IF (TOKEN.EQ.0) STOP 16 CALL CPROG() CALL DCFMWK(TOKEN, ERR) IF (ERR.NE.0) STOP 8 STOP END