#!/bin/csh

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

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

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

