#!/bin/csh

echo 'Deleting entries for PLM ...'
\rm PLM.*.tbl Output.PLM.* Error.PLM.*
sqlplus user/passwd@db @PLM.sql

echo 'Splitting PLM in multiple time spans ...'
../../bin/Split_Station PLM

foreach i (PLM.*.tbl)
echo 'Populating ', $i
../../bin/Populate_Station $i > Output.$i:r
mv Error.log Error.$i:r
end

