| may92.tar |
Listing 14
1: # 2: # Perform consistency checks on subs database for a single publication. 3: # usage: check1.sh 4: # 5: 6: outputdir=/u3/Mailing/Ltmp 7: 8: echo 9: echo "Check subscription records for a single publication" 10: echo " (To be scheduled as an overnight job)" 11: echo 12: 13: mag=`getmag` # prompt for publication code 14: 15: if isonite.sh Check.$mag # don't allow duplications! 16: then 17: echo "An overnight job to check `magname $mag` \c" 18: echo "is already scheduled! Aborting." 19: exit 1 20: fi 21: 22: ofile=$outputdir/Checks.$mag.hold # job output file 23: 24: echo Setting up overnight job... 25: 26: # log file for the job 27: [ -f $outputdir/Checks.$mag.hold ] && rm $outputdir/Checks.$mag.hold 28: 29: next=`nissue $mag` 30: 31: jobfile=`tmpname chk` # temporary script file 32: 33: cat >$jobfile <<END # construct the script 34: 35: cd /u3/Mailing # cd to where the programs are 36: 37: chkzips.bg $mag $next >> $output # Zip code checks 38: echo "\f" | $output 39: 40: sacego -q cntrypro $mag $next >> $output # Country profile 41: echo "\f" | $output 42: 43: sacego -q stsubpro $mag $next >> $output # State profile 44: echo "\f" | $output 45: 46: chmod 666 $outputdir/Checks.$mag.hold 47: END 48: 49: spoolonite.sh Checks.$mag <$jobfile # queue at default priority 50: rm $jobfile # remove the used script file 51: 52: echo 53: echo $mag checks have been queued for overnight processing. To print the 54: echo 'results, choose the "Print consistency checks" option tomorrow.' 55: echo
|