原创: 牛超
2009-06
OSAKA
for /f %%A in (%2) do call :subFunc %%A
:: =========================================
:: #########################################
:: main process
for %%D in (tUser,tWork,tEnv,tQues) do (
ECHO ## %%D Load start %TIME% ##
sqlldr userid=%SQLUID%/%SQLPAS%@%DBCOMP% control=%LOADPH%%%DTabLoader.ctl log=%LOGDR%%%DLoader.log data=%OUTDR%%%D%TXTDAT% bad=%INPDR%%%D_db.bad discard=%INPDR%%%D_db.dis skip=0 errors=0 rows=1000 discardmax=1 READSIZE=10000000 BINDSIZE=1000000 >> %LOGDR%%BATID%test.log
if not %ERRORLEVEL% == 0 goto ABEND6
ECHO ## %%D Load end %TIME% ##
ECHO %BAR%
)
:: #########################################
:: =========================================
:subFunc
set LISTW=%1
set se=%LISTW:~0,6%
set LIST=%LISTW:~7,60%
if "%se%" == "BATDIR" (set BATDIR=%LIST%)
if "%se%" == "SQLPAS" (set SQLPAS=%LIST%)
if "%se%" == "SQLUID" (set SQLUID=%LIST%)
ECHO %se% = %LIST%