#! /bin/tcsh -f # ----------------------------------------------------------------------------- # # Name : compare_tableids_jobset_onerun.tcsh # # Purpose : For a given run, compare the CIDs for a list of tables in a set # with the given process_name (and optional version) # to the list in the reference jobset. # # Usage : compare_tableids_jobset_runlist.tcsh # # Options : The argument is optional. # # Arguements : # = the jobset which has the correct list of tables # = the run number you wish to compare to # = process_name of used_set to check # e.g., PROD_PHYSICS_CDF # = version of used_set # e.g., 7 # # Created : 10/12/03 : Ben Cooper # # Note : Identical to Rob Snihurs script compare_tableids_jobset_runlist.tcsh except only # except only takes a single run. # # # ----------------------------------------------------------------------------- echo $$ $0 $* # Print pid, script name, input args. if ( $# > 2 && $# < 5 ) then # If correct number of input args. set jobset = $1; shift argv set run = $1; shift argv set process_name = $1; shift argv set version = '' # Default. if ( x$1 != 'x' ) then # If optional argument exists. set version = $1; shift argv endif # if ( x$1 != 'x' ) then else # Wrong number of input args. echo "Usage: $0:t []" echo "where" echo " = the jobset which has the correct list of tables" echo " = the run number you wish to check against " echo " = process_name of used_set to check" echo " e.g., PROD_PHYSICS_CDF" echo " = version of used_set" echo " e.g., 7" exit 1 # Error exit for wrong number of input args. endif # if ( $# > 2 && $# < 5 ) then source ~cdfsoft/cdf2.cshrc setup cdfsoft2 4.11.2 # Get the reference list of tables for the jobset provided as input.. sqlplus -s cdf_reader/reader@cdfonprd @tableids_from_jobset.sql $jobset > $0:t:r.$$.reftab set r = $run set cmd = "sqlplus -s cdf_reader/reader@cdfonprd @tableids_from_run_and_name.sql $r $process_name $version" #echo $cmd $cmd > $0:t:r.$$.${r} # Get list of tables for this run, name & version. #set cmd = "diff $0:t:r.$$.reftab $0:t:r.$$.${r}" # Compare to reference list. set cmd = "comm -3 $0:t:r.$$.reftab $0:t:r.$$.${r}" # Compare to reference list. echo $cmd $cmd rm $0:t:r.$$.${r} >& /dev/null # Delete temporary file. rm $0:t:r.$$.reftab >& /dev/null # Delete temporary file.