Professional Documents
Culture Documents
Fast - Start Script
Fast - Start Script
rem +--------------------------------------------------------------------------+
rem | |
rem | ///// ///// ///// ////// / OOOOO OOO OOO O OOOO |
rem | / / / / / / O O O O O O O |
rem | /// ///// /// / / O O O O O O OOO |
rem | / / / / / / O O O O O O O |
rem | / / / / / / O O O O O O O |
rem | / / / ///// / / O OOO OOO OOOO OOOO |
rem | |
rem +--------------------------------------------------------------------------+
rem | * GEN * |
rem +--------------------------------------------------------------------------+
rem | Module identification |
rem +--------------------------------------------------------------------------+
rem
rem Module Name : fast_start
rem
rem Version : 1.10
rem
rem Copyright (c) : Yokogawa
rem
rem Author : H. Koekoek
rem
rem +--------------------------------------------------------------------------+
rem | Module specification |
rem +--------------------------------------------------------------------------+
rem
rem Description : This module starts all available fast tools
rem
rem +--------------------------------------------------------------------------+
rem Changes ....
rem +--------------------------------------------------------------------------+
rem Who When Change What
rem +--------------------------------------------------------------------------+
rem KKO Sep-90 1311 First release
rem WRD Mar-91 1601@3 Generation error solved
rem WRD Mar-91 1601@3 Add some sleeps
rem HUR May-92 e168 FAST/TOOLS port RS6000
rem KKO Aug-92 e234@92 Add support set startup
rem HFM Sep-92 e234@99 Testing
rem KKO Feb-93 e299@10 Start sequence: item-integration-alarm
rem KKO Aug-93 e316@25 Start sequence: integration-hist-item-alarm
rem WRD Sep-93 e306 Add AUDIT/FAST
rem KKO Sep-93 e318@1 Add fast_env
rem KKO Jan-94 e318@29 Remove fast_env
rem UNW Jan-94 e307 Add PROCESS/FAST
rem KKO Jun-95 e4033@250 test on *ini.sup i.s.o. *start
rem KKO Aug-95 e4033@275 Add process/fast support set
rem KKO Oct-95 e4847@33 change process_sup_init in prcss_sup_init
rem HVS Feb-97 e5931 Port to Windows NT
rem LVN Apr-97 e5699 Add ACCESS/FAST
rem HVS Aug-97 e6096@237 Integrate Areadat
rem HVS Sep-97 e6096 Swap history and integration
rem HBR Sep-98 e7277 NTPort
rem HBS Sep-99 e7665 Added test for durtim and user_start
rem HVS Nov-99 e7699 Add cd /d %TLS_ROOT_PATH% to make sure we are on
rem the correct drive
rem STM Mar-00 e7665 Do not go exit when 'histr_sub_init' not present
rem Added 'exist' keyword after 'item_sup_init' label
rem HVS Apr-00 e7665 Do not call colourws_start.cmd
rem HVS Jun-01 e8209 Start umhlogtoo for background start
rem HVS Aug-01 e8209 Start umhlogtoo for background start with timeout
rem HVS OCT-01 e8209 Disable default start of areadat
rem HVS Nov-01 e8292 Create %TLS_ROOT_PATH%\tls\started to signal
rem complete startup
rem STM Nov-01 e8292 Create folders missing under certain circumstances
rem STM Nov-01 e8292 Start DURM and INTMON at end of fast_start
rem HVS Jun-02 e9052 Use durwfp -r for testing running BUS/FAST
rem HVS Jul-02 e9185 Change way of creating 'started' file
rem HVS May-03 e9239 Add initialisation/start of FAST/Start
rem STM Sep-03 e9281 - Start DURM before REPORT/ACCESS/USER
rem - Use fmfutl to wait for presence of DSS-dict.
rem HVS Oct-03 e9281 Remove loop when history support is not there
rem HVS Nov-03 e9281 Printer management move to here and correct again
rem UNW Dec-03 e9281 Wait for printer management DB befoer quickload
rem HVS Apr-05 e9435 Add tls environment variables
rem BSH Aug-06 e9728 Move integration_start to the end
rem HVS Aug-06 e9728 Add start of OPC-DA Tunneler
rem BSH Sep-06 e9728 Repair integration start problem (SCR #4)
rem BHS Oct-06 e9728 Generate "tls_versions.lst" for version info ftmonitor
rem HVS Nov-06 e9728 Use -s instead of -r for durwfp
rem BHS Nov-06 e9728 Move printer management start to integration_start
rem BHS Jun-08 i10028 Correct label in test of datbs_sup_init.cmd
rem HVS Feb-10 e10100 web-HMI Phase 2
rem HVS May-10 e10307 Use TLS_LST_PATH
rem HVS Feb-11 e10467 Create TLS_LOG_PATH directory if not existing
rem HVS Feb-11 e10467 Add check on TLS_LOG_PATH
rem BHS Apr-11 i10511 Add check on wflini.sup for starting USER/FAST
rem BGR Oct-12 e10635 Fixed fast_lite load synchronisation together with wait
fmfprt in integration_start.cmd
rem KKO Aug-13 e10813 Remove areadat
rem HVS Feb-15 e11033 Correct looping if fast_lite_start.cmd doesn't exist
rem NMK Sep-18 e12021 Start of F/T based on the status of PC Redudancy Platform
rem NMK Sep-18 e11929 Start of PRCCHK after BUS
rem SWA JAN-18 e12021 Start PRCCHK before BUS as it does not need BUS
connection
rem HSB Dec-18 e????? Added permissions check
title FAST/TOOLS
cd /d %TLS_ROOT_PATH%
:start_fast_tools
rem The "setup" package created by InstallShield does not create all folders
rem needed by some of the FAST/TOOLS functions. E.g. the \tls\his folder is
rem not automatically created for a front-end configuration, although it is
rem used by EQP to dump logging information. Therefore at this point in the
rem fast_start script we create folders not automatically created by "setup".
REM Check current user permission if we do not have admin rights exit
net session >nul 2>&1
%TLS_ROOT_PATH%\tls\exe\durwfp -s
if errorlevel 1 goto fast_tools_already_started
SET start=0
:start_database_start
if not exist %TLS_ROOT_PATH%\tls\sup\isfini.sup goto database_sub_init
call %TLS_ROOT_PATH%\tls\com\database_start.cmd
goto start_history_fast
:database_sub_init
if not exist %TLS_ROOT_PATH%\tls\com\datbs_sup_init.cmd goto start_history_fast
call %TLS_ROOT_PATH%\tls\com\datbs_sup_init.cmd
copy %TLS_ROOT_PATH%\tls\com\datbs_sup_init.cmd %TLS_SAV_PATH% > nul
:start_history_fast
if not exist %TLS_ROOT_PATH%\tls\sup\hisini.sup goto history_sub_init
call %TLS_ROOT_PATH%\tls\com\history_start.cmd
goto start_audit_fast
:history_sub_init
if not exist %TLS_ROOT_PATH%\tls\com\histr_sup_init.cmd goto start_audit_fast
call %TLS_ROOT_PATH%\tls\com\audit_start.cmd
goto start_item_fast
:audit_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\audit_sup_init.cmd goto start_item_fast
call %TLS_ROOT_PATH%\tls\com\audit_sup_init.cmd
copy %TLS_ROOT_PATH%\tls\com\audit_sup_init.cmd %TLS_SAV_PATH% > nul
:start_item_fast
if not exist %TLS_ROOT_PATH%\tls\sup\itmini.sup goto item_sup_init
call %TLS_ROOT_PATH%\tls\com\item_start.cmd
goto start_alarm_fast
:item_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\item_sup_init.cmd goto start_alarm_fast
:start_alarm_fast
if not exist %TLS_ROOT_PATH%\tls\sup\almini.sup goto alarm_sup_init
call %TLS_ROOT_PATH%\tls\com\alarm_start.cmd
goto start_equipment_fast
:alarm_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\alarm_sup_init.cmd goto start_equipment_fast
call %TLS_ROOT_PATH%\tls\com\alarm_sup_init.cmd
copy %TLS_ROOT_PATH%\tls\com\alarm_sup_init.cmd %TLS_SAV_PATH% > nul
:start_equipment_fast
if not exist %TLS_ROOT_PATH%\tls\sup\eqpini.sup goto eqpmn_sup_init
call %TLS_ROOT_PATH%\tls\com\equipment_start.cmd
goto start_compute_fast
:eqpmn_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\eqpmn_sup_init.cmd goto start_compute_fast
call %TLS_ROOT_PATH%\tls\com\eqpmn_sup_init.cmd
copy %TLS_ROOT_PATH%\tls\com\eqpmn_sup_init.cmd %TLS_SAV_PATH% > nul
:start_compute_fast
if not exist %TLS_ROOT_PATH%\tls\com\compute_start.cmd goto compute_sup_init
call %TLS_ROOT_PATH%\tls\com\compute_start.cmd
goto start_process_fast
:compute_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\compute_sup_init.cmd goto start_process_fast
call %TLS_ROOT_PATH%\tls\com\compute_sup_init.cmd
copy %TLS_ROOT_PATH%\tls\com\compute_sup_init.cmd %TLS_SAV_PATH% > nul
:start_process_fast
if not exist %TLS_ROOT_PATH%\tls\sup\opcini.sup goto prcss_sup_init
call %TLS_ROOT_PATH%\tls\com\process_start.cmd
goto durm_start
:prcss_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\prcss_sup_init.cmd goto durm_start
call %TLS_ROOT_PATH%\tls\com\prcss_sup_init.cmd
copy %TLS_ROOT_PATH%\tls\com\prcss_sup_init.cmd %TLS_SAV_PATH% > nul
:wait_dss_dict
REM Waiting here for DSS-dictionary to prevent processes starting hereafter
REM and waiting for data-dictionary, to time-out. In this way we can control
REM whether or not to abort the start-up procedure.
REM echo Waiting till DSS dictionary becomes available......
start /B /WAIT %TLS_ROOT_PATH%\tls\exe\fmfutl.exe wait_dss_dict_avail 90 2
if errorlevel 1 goto no_dss_dict
REM echo Found DSS dictionary, continuing.
REM echo.
:start_report_fast
if not exist %TLS_ROOT_PATH%\tls\sup\rptini.sup goto reprt_sup_init
call %TLS_ROOT_PATH%\tls\com\report_start.cmd
goto start_access_fast
:reprt_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\reprt_sup_init.cmd goto start_access_fast
:start_access_fast
if not exist %TLS_ROOT_PATH%\tls\sup\odbini.sup goto access_sup_init
call %TLS_ROOT_PATH%\tls\com\access_start.cmd
goto start_user_fast
:access_sup_init
if not exist %TLS_ROOT_PATH%\tls\com\access_sup_init.cmd goto start_user_fast
:start_user_fast
if not exist %TLS_ROOT_PATH%\tls\sup\wflini.sup goto start_integration_fast
call %TLS_ROOT_PATH%\tls\com\user_start.cmd
:start_integration_fast
if not exist %TLS_ROOT_PATH%\tls\sup\intini.sup goto start_fast_lite
call %TLS_ROOT_PATH%\tls\com\integration_start.cmd
:start_fast_lite
if not exist %TLS_ROOT_PATH%\tls\com\fast_lite_start.cmd goto end_fast_tools
call %TLS_ROOT_PATH%\tls\com\fast_lite_start.cmd
:end_fast_tools
echo FAST/TOOLS started
goto signal_started
:fast_tools_already_started
echo FAST/TOOLS is already running
durwfp -k
goto signal_started
:signal_started
REM Create %TLS_LST_PATH%\started to signal the faststarter process
REM that FAST/TOOLS has been started
echo started >%TLS_LST_PATH%\started
REM Signal the upgrade utility that FAST/TOOLS is started
echo you may delete this file >%TLS_LST_PATH%\started2
:upgrade_in_progress
echo.
echo The upgrade procedure is not yet finished.
echo Execute the jupgrade.cmd script found in tls/com before starting FAST/TOOLS.
echo.
echo FAST/TOOLS start-up procedure has been aborted!
goto script_exit_point
:no_dss_dict
echo.
echo DSS dictionary did not became available on this node within timeout-period
echo FAST/TOOLS start procedure will be aborted.....
echo.
call %TLS_ROOT_PATH%\tls\com\fast_stop.cmd
echo FAST/TOOLS start-up procedure has been aborted!
goto script_exit_point
:no_tls_log_path
echo.
echo The environment variable TLS_LOG_PATH does not exist.
echo.
echo FAST/TOOLS start-up procedure has been aborted!
goto script_exit_point
:script_exit_point