#!/bin/sh
. /usr/bin/orasetup.sh
. /d31/appl/konto/bat/movefiles.sh
echo "Jobb startat :\c" >/d31/appl/konto/log/laddabilbo.txt
date >>/d31/appl/konto/log/laddabilbo.txt
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/ehbgrupp.ctl log=/d31/appl/konto/log/ehbgrupp.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/kampanj.ctl log=/d31/appl/konto/log/kampanj.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/mxurval.ctl log=/d31/appl/konto/log/mxurval.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/load_arg.ctl log=/d31/appl/konto/log/load_arg.log
sqlldr userid=konto/icakort control=/d31/appl/konto/bat/laddabsg.ctl log=/d31/appl/konto/log/laddabsg.log
sqlplus -s konto/icakort << !
set heading off
set verify off
set feedback off
set termout off
set pages 0
begin
konto.fillbilbotables.anrop;
END;
/
EXIT
!

echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "ehbgrupp  status ">>/d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/ehbgrupp.log >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "kampanj  status ">>/d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/kampanj.log >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "mxurval  status ">>/d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/mxurval.log >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "load_arg  status ">>/d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/load_arg.log >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "laddabsg  status ">>/d31/appl/konto/log/laddabilbo.txt
tail -11 /d31/appl/konto/log/laddabsg.log >>/d31/appl/konto/log/laddabilbo.txt
echo "------------------------------------------------------" >>/d31/appl/konto/log/laddabilbo.txt
echo "Jobb klart! :\c" >>/d31/appl/konto/log/laddabilbo.txt
date >>/d31/appl/konto/log/laddabilbo.txt


cat /d31/appl/konto/log/laddabilbo.txt | mailx -s "Konto - Statusrapport" roland.skoldblom@ica.se mats.wieweg@ica.se jesper.danielsson@ica.se 
















