010 cleanup -- Fixes spacing problems in 010 subfield a.
This version will clean only subfield 'a' of 010 and skips records which have no 010 and those that have no 010 subfield 'a'
Get subfield 'a', remove non-digits. If result is exactly 8 digits, substr(result, 0, 2) >=70 or =00 or error. New field a = ' result ' If result is exactly 10 digits, substr(result, 0, 4) >=2001 and <= 2010 (will change as year changes) or error. New field a = ' result' Compare new field a with existing field a and report only those that differ.
Think about whether subfield 'z' needs extra spaces removed.
Deal with non-digit characters in original 010a field. Currently these are simply reported and the record is skipped.
This code may be distributed under the same terms as Perl itself.
Please note that this code is not a product of or supported by the employers of the various contributors to the code.
Bryan Baldus eija [at] inwave [dot] com
Copyright (c) 2003-2004
To install MARC::Errorchecks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MARC::Errorchecks
CPAN shell
perl -MCPAN -e shell install MARC::Errorchecks
For more information on module installation, please visit the detailed CPAN module installation guide.