@Echo off
 REM ===========================================================================
 REM Change Info:
 REM User    Date/Time  Infotext:
 REM J.Fes   24.11.2006 first setup
 REM J.Fes   14.07.2013 Skript is now using JCT Tools
 REM J.Fes   31.01.2017 %CmdCurRoot_DP%\TCPrompt_Custom.cmd
 REM J.Fes   07.02.2017 #LUp: add _JobInitial.cmd
 REM ===========================================================================
 
 Call Echo "**************************************************************************"
 Call Echo "* Excuting JobMgr Script NX Data Processing                              *"
 Call Echo "* Based on Version: 26.01.2018 (c)addPLM GmbH                            *"
 Call Echo "**************************************************************************"

 set JobMgr_TcUser=%~1
 set JobMgr_TcPw=%~2


 REM -- define incudes #New: 05.07.2016/J.Fes
 set JobMgr_10-JobScriptsInc_01=_JobMgrDefaults
 set JobMgr_10-JobScriptsInc_02=_CustomDefaults\TcPrompt

  REM use WatchDog [default=ON]
 set JobMgr_use_PLMJobManagerWatchDog=ON
 REM Start TaskMgr [default=ON] #New 19.06.2014/J.Fes
 set JobMgr_start_TaskMgr=ON

 REM -- #Doc: Inits all Basics of Job
 Call "%~dp0_JobInitial.cmd" "NXCreateNF" "YES" "YES" "YES" "YES

 rem -- TC Prompt for Custom
 set TCPrompt_Custom_DPNE=%CmdCurRoot_DP%\TCPrompt_Custom.cmd
 rem set TCPrompt_Custom_Opt=NX100

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

 REM -- temp dir Organiesieren -------------------------------------------------

 set tempOrig_DP=%temp%

 if exist "%TCPrompt_Custom_DPNE%" Call "%TCPrompt_Custom_DPNE%"
 if "%JobMgr_TCPromptGet_ResCode%" equ "0" Call "%CmdCurRoot_DP%\NXDP10_Main.cmd" "%JobMgr_TcUser%" "%JobMgr_TcPW%" "dba"

 if /i "%JobMgr_Test%" neq "ON" goto :JumbOver
  Banner Test:End
  Call Echo "----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----"
  Call Echo "#TestMode.......................: End of Test"
  Call Echo "JobName.........................: %JobName%"
  pause
:JumbOver



goto :end

REM ============================================================================
:end
 REM -- #Doc: Inits all Basics of Job
 Call "%~dp0_JobFinish.cmd"

REM  cd /d "%tempOrig_DP%"
REM  Call Echo "--------------------------------------------------------------------------"
REM  Call Echo "Info: all files in...............: %temp%"
REM  Call Echo "Info: will be zipt by JobClient..: and send to JobServer"
REM  EXIT /B 0
