better reporting
authorShawn Boyette <sboyette@esilibrary.com>
Wed, 3 Dec 2008 00:01:19 +0000 (00:01 +0000)
committerShawn Boyette <sboyette@esilibrary.com>
Wed, 3 Dec 2008 00:01:19 +0000 (00:01 +0000)
records with no old id are now dumped automatically when old2new is in effect

marc-cleanup

index e4f29d7..0a88756 100755 (executable)
@@ -321,8 +321,14 @@ sub write_record {
       { s/\n// for (@record) }
 
     # write to old->new map file if needed
-    print $OLD2NEW $recmeta{oid}, "\t", $recmeta{nid}, "\n"
-      if ($conf->{'renumber-from'} and $conf->{'original-subfield'});
+    if ($conf->{'renumber-from'} and $conf->{'original-subfield'}) {
+        unless (defined $recmeta{oid}) {
+            my $msg = join(' ', "No old id num found");
+            dump_record($msg);
+        } else {
+            print $OLD2NEW $recmeta{oid}, "\t", $recmeta{nid}, "\n"
+        }
+    }
 
     # and finally, actually write the record
     print $FH @record,"\n";
@@ -333,6 +339,7 @@ sub print_fullcontext {
     print $OUT $conf->{editmsg},"\n";
     print $OUT "\r    Tag:",$recmeta{tag}, " Ind1:'",
       $recmeta{ind1},"' Ind2:'", $recmeta{ind2}, "'";
+    print $OUT " @ ", $conf->{ricount}, "/", $conf->{rocount} + 1,"\n";
     print_context();
     return 0;
 }