setlocal
 REM #New:23.01.19/J.Fes outputs ENV Variables into JobMgr_$Log_DPNE
 REM #LUp:09.01.20/J.Fes solve Issue

 REM #Exa1:  call ENVInfo UG
 REM #Doc1:       Outputs UG* ENV to file 90-ENVInfo.txt
 REM #Exa2:  call ENVInfo UG  "91-ENVAfterProcess.txt"
 REM #Doc2:       #Outputs UG* ENV to file 91-ENVAfterProcess.txt
 REM #Exa3:  call ENVInfo UG  "91-ENVAfterProcess.txt" "NX-UG Variables"
 REM #Doc3:       #Outputs UG* ENV to file 91-ENVAfterProcess.txt with descption NX-UG Variables

 if not defined JobMgr_Log_DP if defined CmdCurRoot_DP set JobMgr_Log_DP=%CmdCurRoot_DP%
 if not defined JobMgr_Log_DP set JobMgr_Log_DP=%~dp0

 set JobMgr_$ENVInfoP1=%~1
 set JobMgr_$Log_DPNE=%JobMgr_Log_DP%\90-ENVInfo.txt
 if "%~2" neq "" set JobMgr_$Log_DPNE=%JobMgr_Log_DP%\%~2
 set JobMgr_$ENVInfoP2=%~3

 if "%JobMgr_$ENVInfoP1%" equ "#DeleteLog#" goto :DeleteFile

 if not defined JobMgr_$ENVInfoP2 set JobMgr_$ENVInfoP2=%JobMgr_$ENVInfoP1%
 if not defined JobMgr_$ENVInfoP2 set JobMgr_$ENVInfoP2=All Variables
 Echo ## - - - - - - - - ## %JobMgr_$ENVInfoP2% ## - - - - - - - - ##>>"%JobMgr_$Log_DPNE%"
 set %JobMgr_$ENVInfoP1%>>"%JobMgr_$Log_DPNE%"

 goto :MyEnd

:DeleteFile
 del "%JobMgr_$Log_DPNE%"

:MyEnd
endlocal
