#!/bin/csh

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

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

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

