@SETLOCAL
@ECHO OFF

@rem === Replacing environment variable (BEGIN) ==========================================
SET HGLAM_INST_PATH=__SetupReplacString_HGLAM__
SET HBAS_INST_PATH=__SetupReplacString_HBase__
@rem === Replacing environment variable (END) ============================================



@rem === Individual ======================================================================
SET HBAS_COMMAND=%HBAS_INST_PATH%\bin\hcmdssetmaint.bat
SET RESULT_FILE=%HGLAM_INST_PATH%\inst\~result_code
SET CMDFILE=%HGLAM_INST_PATH%\bin\hglamgetlogs.bat


@REM === Set command line ================================================================

  SET CMDLINE="%HBAS_COMMAND%" /type GlobalLinkAvailabilityManager /cmd "%CMDFILE%" /option "/datadir \"%%%%HGLAM_DIR%%%%\" /f" /getlog  > hcmdssetmaint.log 2>&1
  call %CMDLINE%
  SET RES=%ERRORLEVEL%

@REM === Finish ==========================================================================

  DEL /Q/F hcmdssetmaint.log
  ECHO %RES% 1> "%RESULT_FILE%"
exit %RES%
@ENDLOCAL
