#! /bin/tcsh -f source ~cdfsoft/cdf2.cshrc setup cdfsoft2 4.11.2 set aaaaa_oracle_dir = `echo $ORACLE_CLIENT_DIR` setenv ORACLE_CLIENT_DIR $aaaaa_oracle_dir setup cdfdb @ run = 177793 #rm cot_cid_changes.out #check that $run has a properly defined (i.e. not BAD) COT table otherwise the check below will not work. @ cot_defined = `sqlplus -s cdf_reader/reader@cdfonprd @def_mod.sql $run` #if the COT table is defined $cot_defined will equal the run number, otherwise will be zero @ num_cot_jobsets = `sqlplus -s cdf_reader/reader@cdfonprd @get_all_jobsets.sql $run PROD_PHYSICS_COT | grep -c .` @ testable = 1; echo $cot_defined echo $testable echo $num_cot_jobsets if(($cot_defined) && (($num_cot_jobsets)==($testable))) then @ cot_jobset = `sqlplus -s cdf_reader/reader@cdfonprd @get_max_jobset.sql $run PROD_PHYSICS_COT` ./compare_tableids_jobset_onerun.tcsh $cot_jobset $run PROD_PHYSICS_CDF 4 >& cot_cid_changes.out #counting the number of COT tables in the compare_tableids_jobset_onerun.tcsh output. If there are tables present it #means differences have been found - script exits if ( `grep -c COTCHANT0 cot_cid_changes.out` || `grep -c COTCTI cot_cid_changes.out` || `grep -c COTPROBCH cot_cid_changes.out` || `grep -c COTSTAGE0 cot_cid_changes.out`) then #mail -s "In fill_passtables: Problem with COT tables for ver4" -c djm@fnal.gov bdc@hep.ucl.ac.uk< cot_cid_changes.out; exit 23 echo "we have a problem" else echo "no problems" endif else echo "not testable" endif