
 Call Echo "****************************************************************************"
 Call Echo "* Excuting Script for PLMJobManager Environ                                *"
 Call Echo "* Version: 09.01.2019 (c)addPLM GmbH                                       *"
 Call Echo "****************************************************************************"

setlocal

 REM -- #Step: Farbe setzen IsIdel
 call ColorSet IsIdel
 call Echo "--- #Step: Setup Base -----------------------------------------------------"

 if not defined SAPSiteId set SAPSiteId=%TcSiteId%
 if not defined JobMgr_PMon_USE set JobMgr_PMon_USE=ON

 if /i "%JobMgr_Debug%" neq "ON" goto :JumbOverDebug
  call Echo "----------------------------------------------------------------------------"
  call Echo "#Debug..........................: %~0"
  call Echo "#Step...........................: Before Job"
  pause
:JumbOverDebug

 set titleTxt=Job:[%JobName%][%SAPSiteId%][%Date% %time:~0,5%][\\%ComputerName%]
 title %titleTxt%

 Echo.                                                                               .
 Echo %titleTxt%
 call Echo "----------------------------------------------------------------------------"
 Call Echo "Job Settings:"
 Call Echo "----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----"
 Call Echo "JobName.........................: %JobName%"
 Call Echo "Computer........................: %ComputerName%"
 Call Echo "JobDir..........................: %temp:~-50%"
 Call Echo "JobMgr SubAction SettingsXml....: %JobMgr_SubActionSettingsXml%"
 Call Echo "##- - - - SAP settings: - - - ##"
 Call Echo "SAPSite.........................: %SAPSiteId%"
 Call Echo "##- - - - NX settings: - - - -##"
 Call Echo "UGII_BASE_DIR...................: %UGII_BASE_DIR%"
 Call Echo "UGII_LOAD_OPTIONS...............: ..\%UGII_LOAD_OPTIONS_NE%"
 Call Echo "UGII_SITE_DIR...................: %UGII_SITE_DIR%"
 Call Echo "UGII_LOCAL_USER_DEF.............: ..\%UGII_LOCAL_USER_DEFAULTS_NE%"
 Call Echo "##- - - - Job settings:  - - -##"
 Call JobParam_List "Job Parameter...................:" "%JobParameter%"
 Call Echo "Proc.Monitor....................: %JobMgr_PMon_USE%"

 call Echo "--- #Step: Extract Job Input List -----------------------------------------"
 set toRun=%JobManagerCmdTools_L%
 set toRun=%toRun% -Action "DSC_SAPIntegration_2017_12"
 set toRun=%toRun% -SubActionSettingsXml "%JobMgr_SubActionSettingsXml%"
 set toRun=%toRun% -JobRoot_DP "%CmdCurRoot_DP%"
 set toRun=%toRun% -JobData1ToProcessDoPrint
 set toRun=%toRun% -JobData2ResultsDoPrint

 if /i "%JobMgr_Debug%" neq "ON" goto :JumbOverDebug
   set toRun=%toRun% -pause -verbose -pauseOnEnd
   set toRunForPrint=%toRun:"='%
   Call Echo "#Debug:.........................: before Job: [%~0]"
   call Echo "#ToRun..........................: %toRunForPrint%"
   pause
:JumbOverDebug

 call %toRun%
 set toRun=

 if /i "%JobMgr_Debug%" neq "ON" goto :JumbOverDebug
  call Echo "----------------------------------------------------------------------------"
  call Echo "#Debug..........................: %~0"
  call Echo "#Step...........................: after Job"
  pause
 :JumbOverDebug

endlocal& set Program_ExitCode=%Program_ExitCode%
goto :eof


