btorder.pl: Automatic Generation of Sirsi Unicorn Order Records
btorder.pl is a Perl script that manipulates MARC records
downloaded from the Baker
& Taylor Title Source II web site. It modifies the MARC
records and creates Sirsi Unicorn format order records. The bib
and order records can be batch loaded into a Sirsi Unicorn
database. Library staff save time by not having to manually create
InstallationInstall Perl if necessary (5.004 or greater required)
Install MARC.pm Perl module
Install Date::Manip Perl module
Configure TS II as indicated below
Read Acquisition Records Formats: Format for Order Records in the Sirsi Record Formatting Manual
Download btorder.tar.gz, and edit scripts for local policies (view the main script)
PerlSirsi ships Perl with Unicorn versions 2000 and up. It is probably better not to add custom modules to the Sirsi-installed Perl. Use or install Perl someplace else on your system, or on another system. The btorder.pl script that creates the bib and order records need not reside your Unicorn server. The btorderload.pl script that loads the orders does need to be on your Unicorn system, but it doesn't require any custom modules, so could point to the Sirsi installed Perl.
Creating a Custom Profile in Title Source IILogin to Title Source II. Select System Setup -- Admin -- MARC Profile List--Add
Give your profile a name and a description.
Make the following selections:
Add 901 a Database Element Line NotesWe also have the following fields in our profile, which are not necessary to use this script:
Delete 090 *
Guidelines for Line Notes in TS-IIIn the TS-II line notes we put information on Sirsi Fund IDs, Holding Codes and number of copies, as well as general notes. The following tables describe subfield codes and how to use them.
Line Notes Subfields
Create Bibload TemplateIn Workflows, schedule a bibload report with the following choices and save it as a template.
Here are the changes to make from the default bibload choices:
Edit the scriptEdit btorder.pl and btorderload.pl, making changes as indicated for your local site..
Using the script
Add records to the cart. Add Line notes to each record, using
the guidelines above.
Use FTP or Sirsi Workflows MarcImport utility to transfer the file to your Sirsi system.
Run the btorder.pl script on the file:
Note any errors or warnings.
Run the bibload template report that you created on the modified bib
records file (not the original bib records file!)
Run btorderload.pl on the neworder file with the -t for test parameter. This will check the validity of the input records without making any changes to your database.
btorderload.pl -t example-neworder
Examine the file order.rpt for error messages. Usually errors will be because of typos or misspellings in Fund ID names or Holding codes. If there are errors, edit the neworder file and correct the errors. Re-run btorderload.pl with the -t parameter until there are no errors. Then run it without the -t parameter to load the order records into your database.
selected info from the order.rpt file, showing no errors:
441 line(s) read.
example error messages from loadorder:
**Cannot link order to fund: fund ID not found
After all order records are loaded, examine the loaded bib and order
records in Workflows. Congratulations!
The script does not implement all fields described in the Record Formatting Manual, but it should be relatively easy to extend it to meet local needs.
I have not tried the script with a Windows NT Sirsi server (don't have one!)
If you have a large number of files from TS-II you can concatenate them into one file before processing (as long as they are all for the same vendor)
If you order from vendors other than Baker & Taylor, you can still use TS-II and this script to load bib and order records. Create a cart, download the records, and use the -v for vendor command-line parameter in the btorder.pl script.
This could be made into a Unicorn custom report or two.
The script could be modified to work with OCLC or any other MARC record producing service instead of TS-II.
A similar script has been written by staff at the
University of Virginia Library, see their page
Yankee to Sirsi Catalog and Order Loading Automation
for more information.
Sirsi is planning on introducing a feature in Unicorn 2003, "Flexible MARC (9XX) Order Loading" that will apparently be similar to the function of this script.
Please let me know if you
have any comments, suggestions, etc.
AcknowledgmentsMigell Acosta of the Santa Monica Public Library thought this process up. He wrote scripts in awk and MS-Access to create Sirsi order records for the B&T CD-ROM product. He also taught me most everything I know about Sirsi. Thanks, Migell!
Thank you also to Sirsi for a fine hackable library automation system and to Baker & Taylor for a book ordering tool that spits out configurable MARC records.
|last updated Oct. 30, 2002
Steve Hunt, Santa Monica College Library