@echo off

 rem ---------------------------------------------------------------------------
 rem Dokumentation PLMJobManager Scripts/Param anwendbare Parameter:
 rem set NXDP22_JtTCExport=true = schaltet den Export von JT Files ein
 rem set NXDP21_JtTCUpdate=true	= schaltet JTUpdate ein
 rem ---------------------------------------------------------------------------
 rem Aenderungs Info:
 rem                  User    Date/Time   Infotext:
 set MyApplCurVerInfo=J.Fes   30.11.2007  Ersterstellung
 set MyApplCurVerInfo=J.Fes   29.04.2014  Change to JCTools
 set MyApplCurVerInfo=J.Fes   01.02.2017  Update

 set JobMgr_TcUser=%~1
 set JobMgr_TcPw=%~2
 set JobMgr_TcGroup=%~3
 if not defined JobMgr_TcGroup set JobMgr_TcGroup=dba


 if not defined NXDP21_JtTCUpdate set NXDP21_JtTCUpdate=false
 if not defined NXDP22_JtTCExport set NXDP22_JtTCExport=false

REM  if not exist "%FMS_HOME%"  call ErrorHandel "S" "FMS_HOME dnf" "Dir not found:[%FMS_HOME%]"

 if /I "%JobMgr_Debug%" equ "ON" (
   pause
 )
 rem -- JT Update TC Singleparts
 IF /i "%NXDP21_JtTCUpdate%" equ "true" call "NXDP21_JtTCUpdate.cmd"
 IF /i "%NXDP_ACTION%" equ "NXDP30_StepToNx" call "NXDP30_StepToNx.cmd"
 IF /i "%NXDP_ACTION%" equ "NXDP50_NxToTc" call "NXDP50_NxToTc.cmd"
 IF /i "%NXDP_ACTION%" equ "NXDP60_NxFileImport" call "NXDP60_NxFileImport.cmd"
 IF /i "%NXDP_ACTION%" equ "NXDP70_AttrSync" call "NXDP70_AttrSync.cmd"


 if /I "%JobMgr_Debug%" equ "ON" (
   pause
 )
 rem -- cleanup
 if /I "%JobMgr_TcNxDebug%" neq "ON" (
  if /I "%JobMgr_Debug%" neq "ON" (
   Echo CleanUp......: %temp%\..
   del /S /Q "%temp%\*.tmp","%temp%\*.stp","%temp%\*.prt","%temp%\tcserver.*","%temp%\tcserver.*.*">nul 1>nul 2>nul
  )
 )

 rem am Ende
 set JobEndDateTime=%Date%/%time:~0,8%
 Call Echo "Job ends........................: %JobEndDateTime%"
 Call Echo "----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----"

 if /I "%JobMgr_Debug%" equ "ON" (
   pause
 )
goto :eof

