@ECHO OFF
CLS
GOTO START
REM  ******************** \QUAL2EU\QUAL2E.BAT ********************
REM  *       Author: D.W. Disney, Senior Scientific/Engineering  *
REM  *                            Computer Specialist            *
REM  *               DynTel Corporation                          *
REM  *         Date: Tuesday, 7 May 1996.  Time: 10:41:51.       *
REM  *  Environment: Microway 486 B2T/50, DOS 5.01               *
REM  * Installation: DynTel Corporation                          *
REM  *               U.S. Environmental Protection Agency        *
REM  *               NERL - Ecosystems Research Div., Athens, GA *
REM  *     Function: To execute QUAL2E for a given test data     *
REM  *               file set.  Can be executed in batch or      *
REM  *               interactive mode.                           *
REM  *     Calling                                               *
REM  *     Sequence: QUAL2E                                      *
REM  *        Input: Command line: none                          *
REM  *                      Other: QUAL2E run time prompts       *
REM  *************************************************************
REM  ----- Label START ------------------------------------------------------
:START
IF "%1"=="DEBUG" GOTO CHECKEXE
IF "%1"=="debug" GOTO CHECKEXE
IF EXIST C:\00\QUAL2EU\XQUAL2EX.EXE GOTO RUN_Q2E1
GOTO ERROR1
REM  ----- Label CHECKEXE ---------------------------------------------------
:CHECKEXE
IF EXIST \QUAL2EU\XQUAL2EX.EXE GOTO RUN_Q2E1
REM  ----- Label ERROR1 -----------------------------------------------------
:ERROR1
ECHO #
ECHO # ----------------------------------------------------------------------
ECHO #
ECHO ##  ERROR:  BAD OR MISSING XQUAL2EX.EXE FILE
ECHO #
ECHO #           The QUAL2E executable task image file XQUAL2EX.EXE is
ECHO #           not located in DOS sub-directory C:\00\QUAL2EU.
ECHO #
ECHO #           Install and/or copy this file and all of its support
ECHO #           files to sub-directory C:\00\QUAL2EU or contact
ECHO #           CEAM for assistance.
ECHO #
ECHO #   Press "<Enter>" key to return to DOS command prompt.
PAUSE >NUL
GOTO STOP
REM  ----- Label RUN_Q2E1 ---------------------------------------------------
:RUN_Q2E1
IF "%1"=="DEBUG" TYPE \QUAL2EU\QUALOPEN.SCR
IF "%1"=="debug" TYPE \QUAL2EU\QUALOPEN.SCR
IF "%1"=="DEBUG" PAUSE >NUL
IF "%1"=="debug" PAUSE >NUL
IF "%1"=="DEBUG" GOTO TYPESCR
IF "%1"=="debug" GOTO TYPESCR
TYPE C:\00\QUAL2EU\QUALOPEN.SCR
PAUSE >NUL
REM  ----- Label TYPESCR ----------------------------------------------------
:TYPESCR
CLS
ECHO #
ECHO #----------------------------------------------------------------------#
ECHO ##  Executing QUAL2E DOS command file.
ECHO #----------------------------------------------------------------------#
ECHO #
ECHO #
ECHO ##  Loading QUAL2E model task image file...wait.
REM
IF "%1"=="DEBUG" SET LFDIR=D:\F77L3\BIN\
IF "%1"=="debug" SET LFDIR=D:\F77L3\BIN\
IF "%1"=="DEBUG" GOTO RUN__Q2E
IF "%1"=="debug" GOTO RUN__Q2E
SET LFDIR=C:\00\QUAL2EU
REM  ----- Label RUN__Q2E ---------------------------------------------------
:RUN__Q2E
IF "%1"=="DEBUG" \QUAL2EU\XQUAL2EX
IF "%1"=="debug" \QUAL2EU\XQUAL2EX
IF "%1"=="DEBUG" GOTO ENDRUN
IF "%1"=="debug" GOTO ENDRUN
ECHO #
ECHO #------------------------#
ECHO ##  QUAL2E run beginning.
ECHO #------------------------#
ECHO #
ECHO #                                    >>Q2E__RUN.LOG
ECHO # ----- RUN DATE/TIME STAMP ----- #  >>Q2E__RUN.LOG
ECHO # ----- Begin Execution     ----- #  >>Q2E__RUN.LOG
ECHO #                                    >>Q2E__RUN.LOG
DATE <C:\00\QUAL2EU\RETURN1.ANS | FIND "C" >>Q2E__RUN.LOG
TIME <C:\00\QUAL2EU\RETURN1.ANS | FIND "C" >>Q2E__RUN.LOG
ECHO #                                    >>Q2E__RUN.LOG
REM CLS
C:\00\QUAL2EU\XQUAL2EX
ECHO #                                   >>Q2E__RUN.LOG
ECHO # ----- End Execution       ----- # >>Q2E__RUN.LOG
ECHO #                                   >>Q2E__RUN.LOG
DATE <C:\00\QUAL2EU\RETURN1.ANS | FIND "C" >>Q2E__RUN.LOG
TIME <C:\00\QUAL2EU\RETURN1.ANS | FIND "C" >>Q2E__RUN.LOG
ECHO #                                   >>Q2E__RUN.LOG
ECHO # --------------------------------------------------- # >>Q2E__RUN.LOG
REM
REM  ----- Label ENDRUN -----------------------------------------------------   
:ENDRUN
SET LFDIR=
ECHO ##  QUAL2E program execution complete.
IF "%1"=="DEBUG" ECHO #   Press "<Enter>" key to return to DOS command prompt.
IF "%1"=="debug" ECHO #   Press "<Enter>" key to return to DOS command prompt.
IF "%1"=="DEBUG" PAUSE >NUL
IF "%1"=="debug" PAUSE >NUL
REM  ----- Label STOP -------------------------------------------------------   
:STOP
ECHO.
IF "%1"=="DEBUG" GOTO FINISH
IF "%1"=="debug" GOTO FINISH
CLS
IF NOT EXIST C:\00\QUAL2EU\QUALMENU.TXT ECHO #
IF NOT EXIST C:\00\QUAL2EU\QUALMENU.TXT ECHO #
REM
IF NOT EXIST C:\00\QUAL2EU\QUALMENU.TXT GOTO FINISH
TYPE C:\00\QUAL2EU\QUALMENU.TXT
REM  ----- Label FINISH -----------------------------------------------------   
:FINISH
