Since in the control file I have to provide a name (hard-coded) I need to rename my file and then remove it. Yet it does not work..it returns code 2. Any suggestions?
JALON_03(){
mv $FIC_INPUT AlimentationFichier.data
sqlldr $BDD_USR/$BDD_PWD@$BDD_STR control=$FIC_CTL
RETCODE=$?
if [ $RETCODE -ne 0 ]; then
echo $RETCODE "[ERR] `date '+%m/%d/%y %H:%M:%S'` Erreur supprimer le fichier!">>$FIC_LOG
exit 2;
fi
rm AlimentationFichier.data
RETCODE=$?
}
I think the script will exit after the error message is written to the Logfile? Then please check if your sqlldr-call is okay.