I have a requirement where I need to convert the existing DOS (.bat) scripts to korn shell scripts. I'm posting this question since I'm a novice to shell scripting and gurus here are very knowledgeable on the subject, although this is not a pure DS question.
The below is an example of an existing DOS script:
Code: Select all
@ECHO OFF
REM Batch File [CRMCARS_VDS.bat]
REM This file executes the CRM CARS Vality job first.
REM If completely successful, it executes the CRM CARS DataStage (Ardent) job next (see :end).
REM Changed 01/28/04 to accept longer AMPROD file layout for new states
echo ****************************************************** > E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
echo Starting VALITY jobs... >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
date /T >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
time /T >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
type E:\Ascential\CRM\CRMCARS\Data\CARSDATE >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
set clean=Y
del /Q E:\Ascential\CRM\CRMCARS\Scripts\*.end
PATH=.;E:\Ascent~1\INTEGR~1;E:\Ascent~1\INTEGR~1\userto~1\bin;%PATH%
cd E:\Ascent~1\CRM\CRMCARS\ScriptX
E:
:doPROD
set CURRSTEP=PROD10
bash PROD10.scr -ipe.env PROD10.env -ipe.env ../ipe.env.sh >> ..\Logs\CRMCARSP.LOG
findstr "Done" E:\Ascential\CRM\CRMCARS\Scripts\PROD10.end
if errorlevel 1 goto abortP
echo --%CURRSTEP% successful. >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
set CURRSTEP=PRDST20
bash PRDST20.scr -ipe.env PRDST20.env -ipe.env ../ipe.env.sh >> ..\Logs\CRMCARSP.LOG
findstr "Done" E:\Ascential\CRM\CRMCARS\Scripts\PRDST20.end
if errorlevel 1 goto abortP
echo --%CURRSTEP% successful. >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
set CURRSTEP=PROD31
bash PROD31.scr -ipe.env PROD31.env -ipe.env ../ipe.env.sh >> ..\Logs\CRMCARSP.LOG
findstr "Done" E:\Ascential\CRM\CRMCARS\Scripts\PROD31.end
if errorlevel 1 goto abortP
echo --%CURRSTEP% successful. >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
goto doDRIV
:abortP
echo Error in %CURRSTEP%. Skipping to DRIVER >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
set clean=N
:doDRIV
set CURRSTEP=DRV40
bash DRV40.scr -ipe.env DRV40.env -ipe.env ../ipe.env.sh >> ..\Logs\CRMCARSP.LOG
findstr "Done" E:\Ascential\CRM\CRMCARS\Scripts\DRV40.end
if errorlevel 1 goto abortD
echo --%CURRSTEP% successful. >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
set CURRSTEP=LOAD50
bash LOAD50.scr -ipe.env LOAD50.env -ipe.env ../ipe.env.sh >> ..\Logs\CRMCARSP.LOG
findstr "Done" E:\Ascential\CRM\CRMCARS\Scripts\LOAD50.end
if errorlevel 1 goto abortD
echo --%CURRSTEP% successful. >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
goto end
:abortD
echo Error in %CURRSTEP%. Skipping to END >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
set clean=N
:end
if %clean%==N goto xend
echo All VALITY steps completed SUCCESSFULLY. >> E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log
copy E:\Ascential\CRM\CRMCARS\Logs\CRMCARS_VDS.log E:\Ascential\CRM\CRMCARS\Data\ValCRMC.AOK
copy E:\Ascential\CRM\CRMCARS\Data\CARSDATE E:\Ascential\CRM\CRMCARS\Temp\CARSDATE
REM *** This section starts Datastage Job. Done here to simplify scheduling.
echo *******************************>> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
echo CARSDATE = >> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
type e:\ASCENTIAL\CRM\CRMCARS\Data\carsdate >> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
echo Starting CRM CARS jobs... >> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
date /T >> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
time /T >> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
CD E:\Ardent\DataStage\Projects\CRMProd\Scripts
DSJOB -file E:\Ardent\Logon\PROD\LOGON.INI HQS364 -run -jobstatus -param RunType=RUN -param ParameterFile=e:\Ardent\DataStage\Projects\CRMProd\Parameters\Parameters.ini -param ProjectSuffix=CRMC -param ClearWorkArea=N -param OverRide=Y CRM_PROD Batch::CRMCMasterControl
SET ERRORLEVEL=0
IF NOT EXIST e:\Ardent\DataStage\Projects\CRMProd\Logs\CRMC_Completed SET ERRORLEVEL=1
IF NOT EXIST E:\Ardent\DataStage\Projects\CRMProd\logs\CRMC_Completed ECHO **** CRM CARS FAILED ---------->> E:\Ardent\DataStage\Projects\CRMProd\Logs\CRMCARS_DS.log
IF EXIST E:\Ardent\Datastage\Projects\CRMProd\logs\CRMC_Completed ECHO **** CRM CARS COMPLETED ------->> E:\Ardent\Datastage\Projects\CRMProd\Logs\CRMCARS_DS.log
IF NOT EXIST E:\Ardent\DataStage\Projects\CRMProd\logs\CRMC_Completed ECHO **** CRM CARS FAILED ---------->> E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCARS_VDS.log
IF EXIST E:\Ardent\Datastage\Projects\CRMProd\logs\CRMC_Completed ECHO **** CRM CARS COMPLETED ------->> E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCARS_VDS.log
:xend
time /T >> E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCARS_VDS.log
echo --End. >> E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCARS_VDS.log
echo ****************************************************** >> E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCARS_VDS.log
type E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCARS_VDS.log >> E:\ASCENTIAL\CRM\CRMCARS\Logs\CRMCHist.log
REM **********************************************************************************************************
REM *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if %clean%==N echo !!!!!! Vality step FAILED !!!!!!
if %clean%==N DELETE GoodJob.txt
IF NOT EXIST e:\Ardent\DataStage\Projects\CRMProd\Logs\CRMC_Completed echo !!!!!! DataStage Job FAILED !!!!!!
IF NOT EXIST e:\Ardent\DataStage\Projects\CRMProd\Logs\CRMC_Completed DELETE GoodJob.txt
REM **********************************************************************************************************
REM End Batch File [CRMCARS_VDS.bat]
Code: Select all
#!/bin/ksh
set +v
# Batch File [CRMCARS_VDS.ksh]
# This file executes the CRM CARS Vality job first.
# If completely successful, it executes the CRM CARS DataStage (Ardent) job next (see :end).
# Changed 01/28/04 to accept longer AMPROD file layout for new states
echo ************************************************* > /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo Starting VALITY jobs... >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
date '%a %m/%d/%y %H:%M:%S' >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /Ascential/CRM/CRMCARS/Data/CARSDATE >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=Y
rm /Ascential/CRM/CRMCARS/Scripts/*.end
PATH=.;/Ascent~1/INTEGR~1;/Ascent~1/INTEGR~1/userto~1/bin;$PATH
DSHOME=/datastage/Ascential/DataStage/DSEngine
FILE1=/Ardent/DataStage/Projects/CRMProd/Logs/CRMC_Completed
cd /Ascent~1/CRM/CRMCARS/ScriptX
E:
# doPROD
export CURRSTEP=PROD10
PROD10.scr -ipe.env PROD10.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/PROD10.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to DRIVER >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
export CURRSTEP=DRV40
DRV40.scr -ipe.env DRV40.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/DRV40.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=LOAD50
LOAD50.scr -ipe.env LOAD50.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/LOAD50.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=PRDST20
PRDST20.scr -ipe.env PRDST20.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/PRDST20.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to DRIVER >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
export CURRSTEP=DRV40
DRV40.scr -ipe.env DRV40.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/DRV40.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=LOAD50
LOAD50.scr -ipe.env LOAD50.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/LOAD50.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=PROD31
PROD31.scr -ipe.env PROD31.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/PROD31.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to DRIVER >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
export CURRSTEP=DRV40
DRV40.scr -ipe.env DRV40.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/DRV40.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=LOAD50
LOAD50.scr -ipe.env LOAD50.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/LOAD50.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=DRV40
DRV40.scr -ipe.env DRV40.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/DRV40.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
export CURRSTEP=LOAD50
LOAD50.scr -ipe.env LOAD50.env -ipe.env ../ipe.env.sh >> ../Logs/CRMCARSP.LOG
grep "Done" /Ascential/CRM/CRMCARS/Scripts/LOAD50.end
if $?=1
then
echo Error in $CURRSTEP. Skipping to END >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
export clean=N
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo ****************************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
exit 1
else
echo --$CURRSTEP successful. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
# end
echo All VALITY steps completed SUCCESSFULLY. >> /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cp /Ascential/CRM/CRMCARS/Logs/CRMCARS_VDS.log /Ascential/CRM/CRMCARS/Data/ValCRMC.AOK
cp /Ascential/CRM/CRMCARS/Data/CARSDATE /Ascential/CRM/CRMCARS/Temp/CARSDATE
# *** This section starts Datastage Job. Done here to simplify scheduling.
echo ******************************* >> /Ardent/DataStage/Projects/CRMProd/Logs/CRMCARS_DS.log
echo CARSDATE = >> /Ardent/DataStage/Projects/CRMProd/Logs/CRMCARS_DS.log
cat /ASCENTIAL/CRM/CRMCARS/Data/carsdate >> /Ardent/DataStage/Projects/CRMProd/Logs/CRMCARS_DS.log
echo Starting CRM CARS jobs... >> /Ardent/DataStage/Projects/CRMProd/Logs/CRMCARS_DS.log
date '%a %m/%d/%y %H:%M:%S' >> /Ardent/DataStage/Projects/CRMProd/Logs/CRMCARS_DS.log
CD /Ardent/DataStage/Projects/CRMProd/Scripts
$DSHOME/bin/dsjob -file /Ardent/Logon/PROD/LOGON.INI HQS364 -run -jobstatus -param RunType=RUN -param
ParameterFile=/Ardent/DataStage/Projects/CRMProd/Parameters/Parameters.ini -param ProjectSuffix=CRMC -param ClearWorkArea=N -param
OverRide=Y CRM_PROD Batch::CRMCMasterControl
export $?=0
if [! -e $FILE1 ]
then
export $?=1
ECHO **** CRM CARS FAILED ---------->> /Ardent/DataStage/Projects/CRMProd/Logs/CRMCARS_DS.log
ECHO **** CRM CARS FAILED ---------->> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
if [ -e $FILE1 ]
then
ECHO **** CRM CARS COMPLETED ------->> /Ardent/Datastage/Projects/CRMProd/Logs/CRMCARS_DS.log
ECHO **** CRM CARS COMPLETED ------->> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
fi
#xend
date '%H:%M:%S' >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo --End. >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
echo **************************************** >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log
cat /ASCENTIAL/CRM/CRMCARS/Logs/CRMCARS_VDS.log >> /ASCENTIAL/CRM/CRMCARS/Logs/CRMCHist.log
# **********************************************************************************************************
# *** This section creates ABORT condition in Maestro when either Vality or DataStage failed . *************
if $clean=N
then
echo !!!!!! Vality step FAILED !!!!!!
rm GoodJob.txt
fi
if [! -e $FILE1 ]
then
echo !!!!!! DataStage Job FAILED !!!!!!
rm GoodJob.txt
fi
# **********************************************************************************************************
# End Batch File [CRMCARS_VDS.ksh]
exit 0
Many Thanks in advance,
Whale.