Index: /trunk/tools/eam/rawfix.20230221/src/advance.rawfix.sh
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/advance.rawfix.sh	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/advance.rawfix.sh	(revision 42430)
@@ -36,4 +36,5 @@
   if ($mystate == "md5sum_s2.done")  set tgtstate = "md5chk_s2.new"    
   if ($mystate == "md5chk_s2.done")  set tgtstate = "fixchip_s3.new"   
+  if ($mystate == "fixchip_s3.done") set tgtstate = "ckchip_s3.new"    
 
   if ($tgtstate == "NONE") then
@@ -46,2 +47,4 @@
 endif
 
+echo "ERROR: unknown mode: $mode
+exit 2
Index: /trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh	(revision 42430)
@@ -89,4 +89,7 @@
   if ($mystate == "fixchip_s3.done")  goto good_state
   if ($mystate == "fixchip_s3.fail")  goto good_state
+  if ($mystate == "ckchip_s3.new")    goto good_state
+  if ($mystate == "ckchip_s3.done")   goto good_state
+  if ($mystate == "ckchip_s3.fail")   goto good_state
 
 # disable the rsyncs stages: run in directory from b-node 
Index: /trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl	(revision 42430)
@@ -13,8 +13,8 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
 
-# USAGE: check_chip_locations.pl --dateobs (night) --chiplist (file)
-# USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt
-
-my ($fulldate, $dateword, $chiplist) = &parse_cmdopts;
+# USAGE: check_chip_locations.pl --dateobs (night) --chiplist (file) --stage (v0,v1,etc)
+# USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage v0
+
+my ($fulldate, $dateword, $chiplist, $stage) = &parse_cmdopts;
 my ($neb_dbh, $gpc_dbh) = &parse_db_config ('nebulous.config');
 
@@ -30,5 +30,5 @@
 
 # output files: 
-# instance lists by host: YYYYMMDD/HOSTNAME.inst.txt
+# instance lists by host: YYYYMMDD/HOSTNAME.inst.STAGE.txt
 # chip states by chip: YYYYMMDD/CHIPNAME.uris.txt 
 
@@ -79,5 +79,5 @@
     my @hostnames = keys %hostcount;
     foreach my $myname (@hostnames) {
-	print $hostfh "host $myname = $hostcount{$myname}\n";
+	print $hostfh "$myname $hostcount{$myname}\n";
     }
     close ($hostfh);
@@ -231,5 +231,5 @@
 
 	if (not defined $hostfile{$hostname}) {
-	    open ($hostfile{$hostname}, ">$dateword/$hostname.inst.txt");
+	    open ($hostfile{$hostname}, ">$dateword/$hostname.inst.$stage.txt");
 	    ## XXX deal with open failure here
 	}
@@ -330,9 +330,10 @@
 sub parse_cmdopts {
 
-    my ($dateobs, $chiplist);
-    GetOptions( 'dateobs=s' => \$dateobs, 'chiplist=s' => \$chiplist) || pod2usage(2);
+    my ($dateobs, $chiplist, $stage);
+    GetOptions( 'dateobs=s' => \$dateobs, 'chiplist=s' => \$chiplist, 'stage=s' => \$stage) || pod2usage(2);
     
     pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs;
     pod2usage( -msg => "Provide a list of chips with --chiplist", -exitval => 2) unless defined $chiplist;
+    pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     
     # check the date format (require YYYY/MM/DD and use that from 00:00:00 to 23:59:59 or take start and end?)
@@ -343,9 +344,9 @@
     pod2usage( -msg => "Cannot interpret date, use YYYY/MM/DD", -exitval => 2) if ($date_month < 1) or ($date_month > 12);
     pod2usage( -msg => "Cannot interpret date, use YYYY/MM/DD", -exitval => 2) if ($date_day < 1) or ($date_day > 31);
+
     my $fulldate = "$date_year/$date_month/$date_day";
-    
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($fulldate, $dateword, $chiplist) 
+    return ($fulldate, $dateword, $chiplist, $stage) 
 }
 
Index: /trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl	(revision 42430)
@@ -12,5 +12,5 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
 
-# USAGE: fix_chip_locations.pl --dateobs (night) --chiplist (file)
+# USAGE: fix_chip_locations.pl --dateobs (night) --chiplist (file) --stage (v0,v1,etc)
 
 # we need to select targets for ITC copies of files currently only at ATRC:
@@ -18,5 +18,5 @@
 # for each chip, target a single host?
 
-my ($fulldate, $dateword, $chiplist) = &parse_cmdopts;
+my ($fulldate, $dateword, $chiplist, $stage) = &parse_cmdopts;
 my ($neb_dbh) = &parse_db_config ('nebulous.config');
 
@@ -71,5 +71,5 @@
 	    my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
 	    unless ($newxattr == 1) { die "new instance is not at ATRC? $ext_id : $newfile : $newhost : $newxattr\n"; }
-	    open (OUTFILE, ">>$dateword/$newhost.inst.txt");
+	    open (OUTFILE, ">>$dateword/$newhost.inst.$stage.txt");
 	    print OUTFILE "$newfile $datast $md5sum\n";
 	    close (OUTFILE);
@@ -85,5 +85,5 @@
 	    my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
 	    unless ($newxattr == 0) { die "new instance is not at ITC? $ext_id : $newfile : $newhost : $newxattr\n"; }
-	    open (OUTFILE, ">>$dateword/$newhost.inst.txt");
+	    open (OUTFILE, ">>$dateword/$newhost.inst.$stage.txt");
 	    print OUTFILE "$newfile $datast $md5sum\n";
 	    close (OUTFILE);
@@ -189,9 +189,10 @@
 sub parse_cmdopts {
 
-    my ($dateobs, $chiplist);
-    GetOptions( 'dateobs=s' => \$dateobs, 'chiplist=s' => \$chiplist) || pod2usage(2);
+    my ($dateobs, $chiplist, $stage);
+    GetOptions( 'dateobs=s' => \$dateobs, 'chiplist=s' => \$chiplist, 'stage=s' => \$stage) || pod2usage(2);
     
     pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs;
     pod2usage( -msg => "Provide a list of chips with --chiplist", -exitval => 2) unless defined $chiplist;
+    pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     
     # check the date format (require YYYY/MM/DD and use that from 00:00:00 to 23:59:59 or take start and end?)
@@ -206,5 +207,5 @@
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($fulldate, $dateword, $chiplist);
+    return ($fulldate, $dateword, $chiplist, $stage);
 }
 
Index: /trunk/tools/eam/rawfix.20230221/src/fix_chip_locations_stage2.pl
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/fix_chip_locations_stage2.pl	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/fix_chip_locations_stage2.pl	(revision 42430)
@@ -12,5 +12,5 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
 
-# USAGE: fix_chip_locations.pl --dateobs (night) --chiplist (file)
+# USAGE: fix_chip_locations.pl --dateobs (night) --chiplist (file) --stage (v0,v1,etc)
 
 # we need to select targets for ITC copies of files currently only at ATRC:
@@ -18,5 +18,5 @@
 # for each chip, target a single host?
 
-my ($fulldate, $dateword, $chiplist) = &parse_cmdopts;
+my ($fulldate, $dateword, $chiplist, $stage) = &parse_cmdopts;
 my ($neb_dbh) = &parse_db_config ('nebulous.config');
 
@@ -75,5 +75,5 @@
 	    my ($newfile, $newhost, $newxattr) = &get_new_instance ($ext_id);
 	    unless ($newxattr == 1) { die "new instance is not at ATRC? $ext_id : $newfile : $newhost : $newxattr\n"; }
-	    open (OUTFILE, ">>$dateword/$newhost.inst.txt");
+	    open (OUTFILE, ">>$dateword/$newhost.inst.$stage.txt");
 	    print OUTFILE "$newfile $datast $md5sum\n";
 	    close (OUTFILE);
@@ -189,9 +189,10 @@
 sub parse_cmdopts {
 
-    my ($dateobs, $chiplist);
-    GetOptions( 'dateobs=s' => \$dateobs, 'chiplist=s' => \$chiplist) || pod2usage(2);
+    my ($dateobs, $chiplist, $stage);
+    GetOptions( 'dateobs=s' => \$dateobs, 'chiplist=s' => \$chiplist, 'stage=s' => \$stage) || pod2usage(2);
     
     pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs;
     pod2usage( -msg => "Provide a list of chips with --chiplist", -exitval => 2) unless defined $chiplist;
+    pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     
     # check the date format (require YYYY/MM/DD and use that from 00:00:00 to 23:59:59 or take start and end?)
@@ -206,5 +207,5 @@
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($fulldate, $dateword, $chiplist);
+    return ($fulldate, $dateword, $chiplist, $stage);
 }
 
Index: /trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh	(revision 42430)
@@ -1,10 +1,11 @@
 #!/bin/csh
 
-if ($#argv != 1) then
-  echo "USAGE: get_hosts_md5s.sh (dateobs)"
+if ($#argv != 2) then
+  echo "USAGE: get_hosts_md5s.sh (dateobs) (stage)"
   exit 2
 endif
 
 set dirname = $1
+set stage   = $2
 
 if (! -d $dirname) then
@@ -14,4 +15,4 @@
 
 # report both the dateobs and the hostnames 
-ls $dirname/*.inst.txt | awk -v dateobs=$dirname -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $2}' | sed s/.inst.txt//
+ls $dirname/*.inst.$stage.txt | awk -v dateobs=$dirname -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $2}' | sed s/.inst.$stage.txt//
 exit 0
Index: /trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl	(revision 42430)
@@ -11,7 +11,7 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
 
-# USAGE: get_md5s_instances.pl --hostname (hostname) --input (file)
+# USAGE: get_md5s_instances.pl --hostname (hostname) --input (file) --stage (v0,v1,etc)
 
-my ($myhost, $input) = &parse_cmdopts;
+my ($myhost, $input, $stage) = &parse_cmdopts;
 
 # check that we are running this script on 'myhost'
@@ -23,5 +23,5 @@
 
 my $output = $input;
-$output =~ s/inst/md5s/;
+$output =~ s/inst.$stage/md5s/;
 
 if ($output eq $input) { die "output file ($output) matches input file ($input)\n"; }
@@ -84,11 +84,12 @@
 sub parse_cmdopts {
 
-    my ($myhost, $input);
-    GetOptions( 'hostname=s' => \$myhost, 'input=s' => \$input) || pod2usage(2);
+    my ($myhost, $input, $stage);
+    GetOptions( 'hostname=s' => \$myhost, 'input=s' => \$input, 'stage=s' => \$stage) || pod2usage(2);
     
     pod2usage( -msg => "Provide the input list with --input", -exitval => 2) unless defined $input;
     pod2usage( -msg => "Define the host machine with --hostname", -exitval => 2) unless defined $myhost;
+    pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     
-    return ($myhost, $input);
+    return ($myhost, $input, $stage);
 }
 
Index: /trunk/tools/eam/rawfix.20230221/src/get_md5s_instances_stage2.pl
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/get_md5s_instances_stage2.pl	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/get_md5s_instances_stage2.pl	(revision 42430)
@@ -11,7 +11,7 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version );
 
-# USAGE: get_md5s_instances.pl --hostname (hostname) --input (file)
+# USAGE: get_md5s_instances.pl --hostname (hostname) --input (file) --stage (v0,v1,etc)
 
-my ($myhost, $input) = &parse_cmdopts;
+my ($myhost, $input, $stage) = &parse_cmdopts;
 
 # check that we are running this script on 'myhost'
@@ -23,5 +23,5 @@
 
 my $output = $input;
-$output =~ s/inst/md5s/;
+$output =~ s/inst.$stage/md5s/;
 
 if ($output eq $input) { die "output file ($output) matches input file ($input)\n"; }
@@ -117,11 +117,12 @@
 sub parse_cmdopts {
 
-    my ($myhost, $input);
-    GetOptions( 'hostname=s' => \$myhost, 'input=s' => \$input) || pod2usage(2);
+    my ($myhost, $input, $stage);
+    GetOptions( 'hostname=s' => \$myhost, 'input=s' => \$input, 'stage=s' => \$stage) || pod2usage(2);
     
     pod2usage( -msg => "Provide the input list with --input", -exitval => 2) unless defined $input;
     pod2usage( -msg => "Define the host machine with --hostname", -exitval => 2) unless defined $myhost;
+    pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
     
-    return ($myhost, $input);
+    return ($myhost, $input, $stage);
 }
 
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt	(revision 42430)
@@ -61,7 +61,4 @@
   npending 1
 
-  stdout $LOGDIR/ckchip.run.stdout.log  
-  stderr $LOGDIR/ckchip.run.stderr.log
-
   task.exec
     # if we are unable to run the 'exec', use a long retry time
@@ -80,4 +77,9 @@
     option $pageName
 
+    # this is the first place in the proces that this location is known
+    mkdir  $DATEOBS
+    stdout $DATEOBS/log.ckchip.v0  
+    stderr $DATEOBS/log.ckchip.v0
+
     substr $DATEOBS 0 4 YEAR
     substr $DATEOBS 4 2 MONTH
@@ -86,12 +88,9 @@
     sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
 
-    command check_chip_locations.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt
+    command check_chip_locations.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v0
   end
 
-  ## XX delete the page from the book if done?
+  # mark the entry done, will be deleted above in .load
   task.exit 0
-    # convert the stdout 'queue' to entries in a book
-    # fields in the table will become words in the page
-    # use the queuesize (Nhosts) to track how many jobs are done / to be done
     book setword ckchip.book $options:0 pantaskState DONE
     exec update.rawfix.sh $options:0 ckchip.done
@@ -119,2 +118,7 @@
 end
 
+# option for writing stdout / stderr to a file
+# queuepush stdout "------- end of stdout ---------"
+# queuesave stdout $options:0/log.ckchip.v0
+# queuepush stderr "------- end of stderr ---------"
+# queuesave stderr $options:0/log.ckchip.v0
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip_s3.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip_s3.pt	(revision 42430)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip_s3.pt	(revision 42430)
@@ -0,0 +1,121 @@
+## pantasks scripts to manage the raw exposure data repair / cleanup
+## this is for the initial chip instance checks
+## use the top-level rawfix.pt to load
+
+# these tasks run the steps: 
+# -- check_chip_locations.pl --dateobs YYYY/MM/DD --chiplist file.txt
+# -- fix_chip_locations.pl --dateobs (YYYY/MM/DD)
+
+if (not($?RAWFIX_CKCHIP_S3_INIT))
+  book init ckchip_s3.book
+  $RAWFIX_CKCHIP_S3_INIT = 1
+end
+
+# select nights in state ckchip_s3.new
+# output: ckchip_s3.book
+task nights.ckchip_s3.load
+  host local
+  periods -poll $TPOLL
+  periods -exec $TEXEC
+  periods -timeout 30
+
+  stdout $LOGDIR/ckchip_s3.load.stdout.log  
+  stderr $LOGDIR/ckchip_s3.load.stderr.log
+
+  # only run one of these tasks at a time
+  npending 1
+
+  task.exec
+    command check.rawfix.sh state ckchip_s3.new 
+  end
+
+  # need to delete DONE entries here so the book is not repopulated
+  # by already-running load tasks
+  task.exit 0
+    # convert the stdout 'queue' to entries in a book
+    # fields in the table will become words in the page
+    queue2book -raw-columns -key dateobs -uniq -setword pantaskState INIT -setword pantasksQuality OK stdout ckchip_s3.book
+    book delpage ckchip_s3.book -key pantaskState DONE
+  end
+
+  # exit values other than 0:
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+task nights.ckchip_s3.run
+
+  periods      -poll $RPOLL
+  periods      -exec $REXEC
+  periods      -timeout 60
+  npending 1
+
+  stdout $LOGDIR/ckchip_s3.run.stdout.log  
+  stderr $LOGDIR/ckchip_s3.run.stderr.log
+
+  task.exec
+    # if we are unable to run the 'exec', use a long retry time
+    periods -exec $REXEC
+
+    book npages ckchip_s3.book -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new nights in ckchip_s3.book (pantaskState == INIT)
+    book getpage ckchip_s3.book 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword ckchip_s3.book $pageName pantaskState RUN
+    book getword ckchip_s3.book $pageName dateobs -var DATEOBS
+    option $pageName
+
+    substr $DATEOBS 0 4 YEAR
+    substr $DATEOBS 4 2 MONTH
+    substr $DATEOBS 6 2 DAY
+
+    sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
+
+    command check_chip_locations.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v1
+  end
+
+  ## XX delete the page from the book if done?
+  task.exit 0
+    queuepush stdout "------- end of stdout ---------"
+    queuesave stdout $options:0/log.ckchip_s3.v1
+    queuepush stderr "------- end of stderr ---------"
+    queuesave stderr $options:0/log.ckchip_s3.v1
+    book setword ckchip_s3.book $options:0 pantaskState DONE
+    exec update.rawfix.sh $options:0 ckchip_s3.done
+  end
+
+  # exit values other than 0:
+  task.exit    default
+    showcommand failure
+    book setword ckchip_s3.book $options:0 pantasksQuality FAIL
+    exec update.rawfix.sh $options:0 ckchip_s3.fail
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword ckchip_s3.book $options:0 pantasksQuality CRASH
+    exec update.rawfix.sh $options:0 ckchip_s3.fail
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+    book setword ckchip_s3.book $options:0 pantasksQuality TIMEOUT
+    exec update.rawfix.sh $options:0 ckchip_s3.fail
+  end
+end
+
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt	(revision 42430)
@@ -79,4 +79,7 @@
     option $pageName
 
+    stdout $pageName/log.fixchip.v0  
+    stderr $pageName/log.fixchip.v0
+
     substr $DATEOBS 0 4 YEAR
     substr $DATEOBS 4 2 MONTH
@@ -84,12 +87,9 @@
     sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
 
-    command fix_chip_locations.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt
+    command fix_chip_locations.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v0
   end
 
   ## XX delete the page from the book if done?
   task.exit 0
-    # convert the stdout 'queue' to entries in a book
-    # fields in the table will become words in the page
-    # use the queuesize (Nhosts) to track how many jobs are done / to be done
     book setword fixchip.book $options:0 pantaskState DONE
     exec update.rawfix.sh $options:0 fixchip.done
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip_s2.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip_s2.pt	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip_s2.pt	(revision 42430)
@@ -84,5 +84,5 @@
     sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
 
-    command fix_chip_locations_stage2.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt
+    command fix_chip_locations_stage2.pl --dateobs $FULLDATE --chiplist gpc1.chips.txt --stage v0
   end
 
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt	(revision 42430)
@@ -86,5 +86,5 @@
     exec echo "# start runhosts $mydate" >> $tmpline
 
-    command get_hosts_md5s.sh $DATEOBS
+    command get_hosts_md5s.sh $DATEOBS v0
   end
 
@@ -124,7 +124,4 @@
   periods      -timeout 60
 
-  stdout $LOGDIR/md5sum.runhosts.stdout.log  
-  stderr $LOGDIR/md5sum.runhosts.stderr.log
-
   task.exec
     # if we are unable to run the 'exec', use a long retry time
@@ -146,6 +143,8 @@
     # save DATEOBS so we can find the md5sum.book entry
 
+    stdout $mypath/$DATEOBS/log.md5sum.runhosts.v0  
+    stderr $mypath/$DATEOBS/log.md5sum.runhosts.v0  
+
     # XXX TEST: $USE_HOST = ipp060
-
     $USE_HOST = $MD5HOST
     host -required $USE_HOST
@@ -161,10 +160,10 @@
 
     ## even when testing, use the original hostname here:
-    $input = $mypath/$DATEOBS/$MD5HOST.inst.txt
+    $input = $mypath/$DATEOBS/$MD5HOST.inst.v0.txt
 
     # need to make sure this will work on the ipp b-nodes:
     # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs
     periods -exec 0.05
-    command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input
+    command $mypath/get_md5s_instances.pl --hostname $USE_HOST --input $input --stage v0
   end
 
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum_s2.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum_s2.pt	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum_s2.pt	(revision 42430)
@@ -86,5 +86,5 @@
     exec echo "# start runhosts $mydate" >> $tmpline
 
-    command get_hosts_md5s.sh $DATEOBS
+    command get_hosts_md5s.sh $DATEOBS v0
   end
 
@@ -161,10 +161,10 @@
 
     ## even when testing, use the original hostname here:
-    $input = $mypath/$DATEOBS/$MD5HOST.inst.txt
+    $input = $mypath/$DATEOBS/$MD5HOST.inst.v0.txt
 
     # need to make sure this will work on the ipp b-nodes:
     # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs
     periods -exec 0.05
-    command $mypath/get_md5s_instances_stage2.pl --hostname $USE_HOST --input $input
+    command $mypath/get_md5s_instances_stage2.pl --hostname $USE_HOST --input $input --stage v0
   end
 
Index: /trunk/tools/eam/rawfix.20230221/src/rawfix.pt
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/rawfix.pt	(revision 42429)
+++ /trunk/tools/eam/rawfix.20230221/src/rawfix.pt	(revision 42430)
@@ -23,12 +23,13 @@
 # order is this file is not determinative, only the
 # change of state from STAGE1.new -> STAGE1.done -> STAGE2.new
+# input rawfix.advance.pt
 input rawfix.ckchip.pt
-input rawfix.fixchip.pt
-input rawfix.md5sum.pt
-input rawfix.md5chk.pt
-input rawfix.fixchip_s2.pt
-input rawfix.md5sum_s2.pt
-input rawfix.md5chk_s2.pt
-input rawfix.fixchip_s3.pt
+# input rawfix.fixchip.pt
+# input rawfix.md5sum.pt
+# input rawfix.md5chk.pt
+# input rawfix.fixchip_s2.pt
+# input rawfix.md5sum_s2.pt
+# input rawfix.md5chk_s2.pt
+# input rawfix.fixchip_s3.pt
 
 # no need to run rsync if we use the b-node working directory:
Index: /trunk/tools/eam/rawfix.20230221/src/select.nights.sql
===================================================================
--- /trunk/tools/eam/rawfix.20230221/src/select.nights.sql	(revision 42430)
+++ /trunk/tools/eam/rawfix.20230221/src/select.nights.sql	(revision 42430)
@@ -0,0 +1,1 @@
+select count(datename) as Nexp, datename from (select exp_name, filter, date_format(dateobs,"%Y%m%d") as datename from rawExp where (dateobs >= '2010/05/01') and (dateobs < '2011/01/01')) as tmp group by datename order by Nexp desc 
