Index: trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl	(revision 42462)
@@ -13,4 +13,5 @@
 
 # USAGE: advance.rawfix.pl --mode (all/night) --dateobs (night) --topdir (dirname) --Nmax Nmax
+# topdir used only to find the nebulous config
 
 my ($mode, $topdir, $fulldate, $dateword, $Nmax) = &parse_cmdopts;
Index: trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl	(revision 42462)
@@ -16,5 +16,5 @@
 # USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage 0
 
-my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
+my ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) = &parse_cmdopts;
 my ($neb_dbh, $gpc_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
 
@@ -27,5 +27,5 @@
 
 # put output files in a directory defined by the night
-mkdir "$topdir/$dateword";
+mkdir "$basedir/$dateword";
 
 # output files: 
@@ -48,12 +48,12 @@
 my $Nfail = 0;
 
-my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($topdir, $dateword, $stage);
+my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($basedir, $dateword, $stage);
 
 foreach my $chip_id (@chip_ids) {
 
     my $outfh;
-    open ($outfh, ">$topdir/$dateword/$chip_id.uris.$stage.txt");
-
-    # print "open $topdir/$dateword/$chip_id.uris.$stage.txt\n";
+    open ($outfh, ">$basedir/$dateword/$chip_id.uris.$stage.txt");
+
+    # print "open $basedir/$dateword/$chip_id.uris.$stage.txt\n";
 
     # get the list of chip neb paths for one chip
@@ -87,5 +87,5 @@
     # now save the host count for this chip
     my $hostfh;
-    open ($hostfh, ">$topdir/$dateword/$chip_id.hosts.txt");
+    open ($hostfh, ">$basedir/$dateword/$chip_id.hosts.txt");
 
     # save the host count for this chip
@@ -277,5 +277,5 @@
 
 	if (not defined $hostfile{$hostname}) {
-	    open ($hostfile{$hostname}, ">$topdir/$dateword/$hostname.inst.$stage.txt");
+	    open ($hostfile{$hostname}, ">$basedir/$dateword/$hostname.inst.$stage.txt");
 	    ## XXX deal with open failure here
 	}
@@ -408,5 +408,5 @@
 sub get_good_or_fail_chiplists {
 
-    my $topdir   = $_[0];
+    my $basedir   = $_[0];
     my $dateword = $_[1];
     my $stage    = $_[2];
@@ -414,5 +414,5 @@
     # load the lists of good and fail chips
     my $prev = $stage - 1;
-    my $goodfile = "$topdir/$dateword/goodchips.$prev.txt";
+    my $goodfile = "$basedir/$dateword/goodchips.$prev.txt";
     my %goodchips;
     if (-e $goodfile) {
@@ -426,5 +426,5 @@
 	}
     }
-    my $failfile = "$topdir/$dateword/failchips.$prev.txt";
+    my $failfile = "$basedir/$dateword/failchips.$prev.txt";
     my %failchips;
     if (-e $failfile) {
@@ -466,5 +466,8 @@
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($fulldate, $dateword, $chiplist, $stage, $topdir) 
+    my $yearobs = substr ($dateword, 0, 4);
+    my $basedir = "$topdir/$yearobs";
+
+    return ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) 
 }
 
Index: trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl	(revision 42462)
@@ -14,8 +14,9 @@
 # USAGE: check_md5s_dateobs.pl --dateobs (night) --topdir (topdir)
 
-my ($dateword, $stage, $topdir) = &parse_cmdopts;
-
-my $instlist_r = &load_instlist_filenames ($topdir, $dateword, $stage);
-my $md5slist_r = &load_md5slist_filenames ($topdir, $dateword, $stage, $instlist_r);
+my ($dateword, $stage, $topdir, $basedir) = &parse_cmdopts;
+# basedir used only for night-level files
+
+my $instlist_r = &load_instlist_filenames ($basedir, $dateword, $stage);
+my $md5slist_r = &load_md5slist_filenames ($basedir, $dateword, $stage, $instlist_r);
 
 my $Nfail = 0;
@@ -36,5 +37,5 @@
     close (FILE);
 
-    my $instdata_r = &load_instance_list ($topdir, $dateword, $stage, $instfile);
+    my $instdata_r = &load_instance_list ($basedir, $dateword, $stage, $instfile);
 
     # if these do not match, complain and move on
@@ -94,5 +95,5 @@
 
 # save both good and fail chip lists
-open (OUTFILE, ">$topdir/$dateword/goodchips.$stage.txt");
+open (OUTFILE, ">$basedir/$dateword/goodchips.$stage.txt");
 my @goodchipURIs = keys %goodchips;
 foreach my $uri (@goodchipURIs) {
@@ -101,5 +102,5 @@
 close (OUTFILE);
 
-open (OUTFILE, ">$topdir/$dateword/failchips.$stage.txt");
+open (OUTFILE, ">$basedir/$dateword/failchips.$stage.txt");
 my @failchipURIs = keys %failchips;
 foreach my $uri (@failchipURIs) {
@@ -120,7 +121,7 @@
 }
 
-# use global $topdir, $dateword, $myhost, $stage
+# use global $basedir, $dateword, $myhost, $stage
 sub load_instance_list {
-    my $topdir   = $_[0];
+    my $basedir   = $_[0];
     my $dateword = $_[1];
     my $stage    = $_[2];
@@ -134,5 +135,5 @@
     # there may be additional instances in files with names like HOSTNAME.XYnn.inst.STAGE 
     my ($myhost) = $instfile =~ m|$dateword/([0-9a-zA-Z]*).inst.$stage.txt|;
-    my @instlist = glob ("$topdir/$dateword/$myhost.XY??.inst.$stage.txt");
+    my @instlist = glob ("$basedir/$dateword/$myhost.XY??.inst.$stage.txt");
     foreach my $infile  (@instlist) {
 	&load_instance_list_onefile ($infile, \@instdata_list);
@@ -160,9 +161,9 @@
 sub load_instlist_filenames {
     
-    my $topdir   = $_[0];
+    my $basedir   = $_[0];
     my $dateword = $_[1];
     my $stage    = $_[2];
 
-    my @instlist_all = glob ("$topdir/$dateword/*.inst.$stage.txt");
+    my @instlist_all = glob ("$basedir/$dateword/*.inst.$stage.txt");
 
     my @instlist = ();
@@ -181,10 +182,10 @@
 sub load_md5slist_filenames {
 
-    my $topdir     = $_[0];
+    my $basedir     = $_[0];
     my $dateword   = $_[1];
     my $stage      = $_[2];
     my $instlist_r = $_[3];
 
-    my @md5slist = glob ("$topdir/$dateword/*.md5s.txt");
+    my @md5slist = glob ("$basedir/$dateword/*.md5s.txt");
 
     my %md5shash;
@@ -252,5 +253,8 @@
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($dateword, $stage, $topdir);
+    my $yearobs = substr ($dateword, 0, 4);
+    my $basedir = "$topdir/$yearobs";
+
+    return ($dateword, $stage, $topdir, $basedir);
 }
 
Index: trunk/tools/eam/rawfix.20230221/src/check_night_status.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/check_night_status.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/check_night_status.pl	(revision 42462)
@@ -1,3 +1,4 @@
 #! /usr/bin/env perl
+# this program must be run at the top-level rawfix directory
 
 my $DEBUG = 4;
@@ -18,4 +19,5 @@
 
 my ($fulldate, $dateword, $chiplist, $stage) = &parse_cmdopts;
+my $yearobs = substr ($dateword, 0, 4);
 
 # read the list of chip_ids:
@@ -36,5 +38,5 @@
 foreach my $chip_id (@chip_ids) {
 
-    my $urifile = "$dateword/$chip_id.uris.$stage.txt";
+    my $urifile = "$yearobs/$dateword/$chip_id.uris.$stage.txt";
     unless (-e $urifile) { die "missing chip URI list $urifile\n"; }
 
Index: trunk/tools/eam/rawfix.20230221/src/finish.fixchip.sh
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/finish.fixchip.sh	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/finish.fixchip.sh	(revision 42462)
@@ -1,3 +1,5 @@
 #!/bin/csh
+
+# this script is not actually used in regular rawfix processing?
 
 if ($#argv != 4) then
@@ -16,6 +18,9 @@
 endif
 
-if (! -d $topdir/$dateobs) then
-  echo "ERROR: missing dateobs directory $topdir/$dateobs"
+set yearobs = `echo $dateobs | awk '{print substr($1,1,4)}'`
+set basedir = $topdir/$yearobs
+
+if (! -d $basedir/$dateobs) then
+  echo "ERROR: missing dateobs directory $basedir/$dateobs"
   exit 3
 endif
@@ -24,10 +29,10 @@
 echo $fulldate
 
-$topdir/update_chip_stats.pl --topdir $topdir --dateobs $fulldate --stage $iter --chiplist gpc1.chips.txt
+update_chip_stats.pl --topdir $topdir --dateobs $fulldate --stage $iter --chiplist gpc1.chips.txt
 
 if ($QUALITY == "OK") then
-  $topdir/update.rawfix.sh $dateobs fixchip.done 
+  update.rawfix.sh $dateobs fixchip.done 
 else
-  $topdir/update.rawfix.sh $dateobs fixchip.fail 
+  update.rawfix.sh $dateobs fixchip.fail 
 endif
 
Index: trunk/tools/eam/rawfix.20230221/src/fix_chip_failures.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/fix_chip_failures.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/fix_chip_failures.pl	(revision 42462)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
 
-XXX: not yet ready
+die "not yet ready";
 
 # NOTE: in this script, we are using database connections to both NEBULOUS and GPC1 databases
Index: trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl	(revision 42462)
@@ -18,6 +18,7 @@
 # for each chip, target a single host?
 
-my ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir) = &parse_cmdopts;
+my ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir, $basedir) = &parse_cmdopts;
 my ($neb_dbh, $raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
+# topdir used for nebulous.config and chiplist.txt, basedir used for night-level data
 
 # choose ITC machines on which to place backup copies:
@@ -40,5 +41,5 @@
 my $Nfail = 0;
 
-my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($topdir, $dateword, $stage);
+my ($goodchips_r, $failchips_r) = &get_good_or_fail_chiplists ($basedir, $dateword, $stage);
 
 # read the list of chip_ids:
@@ -80,5 +81,5 @@
 } else {
 
-    open (OUTFILE, ">$topdir/$dateword/$chipID.stats.$stage.txt");
+    open (OUTFILE, ">$basedir/$dateword/$chipID.stats.$stage.txt");
 
     print OUTFILE "Nchip: $Nchip\n";
@@ -106,5 +107,5 @@
 
     # read from chip_id file, update to next stage number
-    my $urifile = "$topdir/$dateword/$chip_id.uris.$stage.txt";
+    my $urifile = "$basedir/$dateword/$chip_id.uris.$stage.txt";
     if (! -e $urifile) { die "missing file $urifile\n"; }
     open (URIFILE,  $urifile);
@@ -145,5 +146,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, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
+	    open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
 	    print OUTFILE "$newfile $datast $md5sum\n";
 	    close (OUTFILE);
@@ -160,5 +161,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, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
+	    open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
 	    print OUTFILE "$newfile $datast $md5sum\n";
 	    close (OUTFILE);
@@ -175,5 +176,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, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
+		open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
 		print OUTFILE "$newfile $datast $md5sum\n";
 		close (OUTFILE);
@@ -197,5 +198,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, ">>$topdir/$dateword/$newhost.$chip_id.inst.$stage.txt");
+		open (OUTFILE, ">>$basedir/$dateword/$newhost.$chip_id.inst.$stage.txt");
 		print OUTFILE "$newfile $datast $md5sum\n";
 		close (OUTFILE);
@@ -327,5 +328,5 @@
 sub get_good_or_fail_chiplists {
 
-    my $topdir   = $_[0];
+    my $basedir   = $_[0];
     my $dateword = $_[1];
     my $stage    = $_[2];
@@ -333,5 +334,5 @@
     # load the lists of good and fail chips
     my $prev = $stage - 1;
-    my $goodfile = "$topdir/$dateword/goodchips.$prev.txt";
+    my $goodfile = "$basedir/$dateword/goodchips.$prev.txt";
     my %goodchips;
     if (-e $goodfile) {
@@ -345,5 +346,5 @@
 	}
     }
-    my $failfile = "$topdir/$dateword/failchips.$prev.txt";
+    my $failfile = "$basedir/$dateword/failchips.$prev.txt";
     my %failchips;
     if (-e $failfile) {
@@ -464,5 +465,8 @@
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir);
+    my ($yearobs) = substr ($dateword, 0, 4);
+    my $basedir = "$topdir/$yearobs";
+
+    return ($fulldate, $dateword, $chiplist, $chipID, $stage, $topdir, $basedir);
 }
 
Index: trunk/tools/eam/rawfix.20230221/src/get_hosts_fixchip.sh
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/get_hosts_fixchip.sh	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/get_hosts_fixchip.sh	(revision 42462)
@@ -15,6 +15,9 @@
 endif
 
-if (! -d $topdir/$dateobs) then
-  echo "ERROR: missing dateobs directory $topdir/$dateobs"
+set yearobs = `echo $dateobs | awk '{print substr($1,1,4)}'`
+set basedir = $topdir/$yearobs
+
+if (! -d $basedir/$dateobs) then
+  echo "ERROR: missing dateobs directory $basedir/$dateobs"
   exit 3
 endif
@@ -23,5 +26,5 @@
 echo "dateobs chipID iter fixhost"
 
-foreach f ($topdir/$dateobs/XY??.hosts.txt)
+foreach f ($basedir/$dateobs/XY??.hosts.txt)
   set myhost = `cat $f | grep -v ippb | sort -k 2n | tail -n 1 | prcol 1`
   set chipID = `echo $f | awk -F/ '{print $NF}' | awk -F. '{print $1}'`
Index: trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh	(revision 42462)
@@ -15,10 +15,13 @@
 endif
 
-if (! -d $topdir/$dateobs) then
-  echo "ERROR: missing dateobs directory $topdir/$dateobs"
+set yearobs = `echo $dateobs | awk '{print substr($1,1,4)}'`
+set basedir = $topdir/$yearobs
+
+if (! -d $basedir/$dateobs) then
+  echo "ERROR: missing dateobs directory $basedir/$dateobs"
   exit 3
 endif
 
 # report both the dateobs and the hostnames 
-ls $topdir/$dateobs/*.inst.$stage.txt | grep -v "XY...inst" | awk -v dateobs=$dateobs -v stage=$stage -F/ '(NR == 1){print "dateobs stage md5host"}{print dateobs, stage, $NF}' | sed s/.inst.$stage.txt//
+ls $basedir/$dateobs/*.inst.$stage.txt | grep -v "XY...inst" | awk -v dateobs=$dateobs -v stage=$stage -F/ '(NR == 1){print "dateobs stage md5host"}{print dateobs, stage, $NF}' | 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 42460)
+++ trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl	(revision 42462)
@@ -14,5 +14,5 @@
 
 my $input;
-my ($myhost, $dateword, $topdir, $stage) = &parse_cmdopts;
+my ($myhost, $dateword, $topdir, $basedir, $stage) = &parse_cmdopts;
 
 # check that we are running this script on 'myhost'
@@ -23,5 +23,5 @@
 my ($ins_list_r, $dst_list_r, $md5_list_r) = &load_instance_list ();
 
-my $output = "$topdir/$dateword/$myhost.md5s.txt";
+my $output = "$basedir/$dateword/$myhost.md5s.txt";
 
 # read in existing md5s
@@ -66,14 +66,14 @@
 exit 0;
 
-# use global $topdir, $dateword, $myhost, $stage
+# use global $basedir, $dateword, $myhost, $stage
 sub load_instance_list {
     my (@ins_list, @dst_list, @md5_list);
 
     # load the master list
-    my $input = "$topdir/$dateword/$myhost.inst.$stage.txt";
+    my $input = "$basedir/$dateword/$myhost.inst.$stage.txt";
     &load_instance_list_onefile ($input, \@ins_list, \@dst_list, \@md5_list);
 
     # there may be additional instances in files with names like HOSTNAME.XYnn.inst.STAGE 
-    my @instlist = glob ("$topdir/$dateword/$myhost.XY??.inst.$stage.txt");
+    my @instlist = glob ("$basedir/$dateword/$myhost.XY??.inst.$stage.txt");
     foreach my $infile  (@instlist) {
 	&load_instance_list_onefile ($infile, \@ins_list, \@dst_list, \@md5_list);
@@ -144,5 +144,8 @@
     unless ($stage >= 0) { die "stage must be a non-negative integer\n"; }
     
-    return ($myhost, $dateobs, $topdir, $stage);
+    my $yearobs = substr ($dateobs, 0, 4);
+    my $basedir = "$topdir/$yearobs";
+
+    return ($myhost, $dateobs, $topdir, $basedir, $stage);
 }
 
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt	(revision 42462)
@@ -168,5 +168,5 @@
     end
 
-    sprintf psvidOutput "%s/%s" $mypath $DATEOBS
+    sprintf psvidOutput "%s/%s/%s" $mypath $YEAR $DATEOBS
 
     # if we are able to run the 'exec', use a short retry time to launch all outstanding jobs
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt	(revision 42462)
@@ -59,5 +59,5 @@
   periods      -timeout 60
   host         -required $HOST_CKCHIP
-  npending 1
+  npending 2
 
   task.exec
@@ -78,12 +78,12 @@
     option $pageName
 
-    # this is the first place in the proces that this location is known
-    mkdir  $mypath/$DATEOBS
-    stdout $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER
-    stderr $mypath/$DATEOBS/log.ckchip.runhosts.v$ITER  
-
     substr $DATEOBS 0 4 YEAR
     substr $DATEOBS 4 2 MONTH
     substr $DATEOBS 6 2 DAY
+
+    # this is the first place in the proces that this location is known
+    mkdir  $mypath/$YEAR/$DATEOBS
+    stdout $mypath/$YEAR/$DATEOBS/log.ckchip.runhosts.v$ITER
+    stderr $mypath/$YEAR/$DATEOBS/log.ckchip.runhosts.v$ITER  
 
     sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt	(revision 42462)
@@ -151,11 +151,11 @@
     option $pageName $DATEOBS
 
-    stdout $DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
-    stderr $DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
-
     substr $DATEOBS 0 4 YEAR
     substr $DATEOBS 4 2 MONTH
     substr $DATEOBS 6 2 DAY
     sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
+
+    stdout $mypath/$YEAR/$DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
+    stderr $mypath/$YEAR/$DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
 
     host -required $FIXHOST
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.md5chk.pt	(revision 42462)
@@ -82,6 +82,6 @@
 
     # does the output go here?
-    stdout $mypath/$DATEOBS/log.md5chk.v$ITER
-    stderr $mypath/$DATEOBS/log.md5chk.v$ITER
+    stdout $mypath/$YEAR/$DATEOBS/log.md5chk.v$ITER
+    stderr $mypath/$YEAR/$DATEOBS/log.md5chk.v$ITER
 
     ## this command does NOT use Nebulous or GPC so it can run anywhere
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt	(revision 42462)
@@ -156,7 +156,9 @@
     # save DATEOBS so we can find the md5sum.book entry
 
+    substr $DATEOBS 0 4 YEAR
+
     # does the output go here?
-    stdout $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER  
-    stderr $mypath/$DATEOBS/log.md5sum.runhosts.v$ITER  
+    stdout $mypath/$YEAR/$DATEOBS/log.md5sum.runhosts.v$ITER  
+    stderr $mypath/$YEAR/$DATEOBS/log.md5sum.runhosts.v$ITER  
 
     $USE_HOST = $MD5HOST
Index: trunk/tools/eam/rawfix.20230221/src/update_chip_stats.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/update_chip_stats.pl	(revision 42460)
+++ trunk/tools/eam/rawfix.20230221/src/update_chip_stats.pl	(revision 42462)
@@ -13,6 +13,7 @@
 
 # USAGE: update_chip_locations.pl --dateobs (night) --stage (0,1,etc) --chiplist (file)
-
-my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
+# nebulous.config & chiplist.txt are at topdir
+
+my ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) = &parse_cmdopts;
 my ($raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
 
@@ -38,5 +39,5 @@
 foreach my $chip_id (@chip_ids) {
 
-    open (STATFILE, "$topdir/$dateword/$chip_id.stats.$stage.txt");
+    open (STATFILE, "$basedir/$dateword/$chip_id.stats.$stage.txt");
     my @lines = <STATFILE>;
     close (STATFILE);
@@ -154,5 +155,8 @@
     my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
 
-    return ($fulldate, $dateword, $chiplist, $stage, $topdir);
+    my ($yearobs) = substr ($dateword, 0, 4);
+    my $basedir = "$topdir/$yearobs";
+
+    return ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir);
 }
 
