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: FORT2CF
C   LANGUAGE: FORTRAN
C    PURPOSE: THIS EXAMPLE DEMONSTRATES A C MAIN CALLING A
C             FORTRAN ROUTINE.
C             IT CONSISTS OF SAMPLE LIBRARY MEMBERS
C             FORT2CC, FORT2CF, AND FORT2C.
C MVS -
C    COMPILE: USE JCL PROVIDED IN SAMPLE.AUX(FORT2C).
C       LINK: USE JCL PROVIDED IN SAMPLE.AUX(FORT2C).
C    EXECUTE: USE JCL PROVIDED IN SAMPLE.AUX(FORT2C).
C TSO -
C    COMPILE: FORTRAN - USE FORTRAN COMPILER.
C             C - LC370C FORT2CC USING INDEP OPTION.
C       LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(FORT2C).
C    EXECUTE: CALL .LOAD(FORT2C)
C CMS -
C    COMPILE: FORTRAN - USE FORTRAN COMPILER.
C             C - LC370 FORT2CC USING INDEP OPTION.
C        LINK: ILCLINK, USING CONTROL CARDS IN SAMPLE.AUX(FORT2C).
C     EXECUTE: CALL FORT2C
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