Tech Blog

Creating the holdings records in batch

Have you experienced the situation where you have thousands of contribution books or government depository books which you would like to put into one library location? Do you feel tired of manually creating the holdings records repeatedly for all of the BIB records even with the help of holding templates?
You can create all of the holdings records in a batch or bulk in this situation by using the codes designed below.
First step, compile the Java code by using the command line “javac”.
Second step, run this Java code by using “java HoldingCreating”.
Third step, in the pop up window, input the library location you would like to create the holdings records in.
Fourth step, click the button to locate the text file containing your MMS ID list.
The text file containing MMS IDs list has the format as follows. You could use Nodepad++ to create the file.
After that, the code will retrieve MMS ID from this file line by line and create a corresponding holdings record for each BIB record matching the MMS ID.
Please modify the holding string (xmlInputString) according to your library holdings templates or your library cataloging policy. As follows is an instance. I leave the 852 field sub field h and sub field i empty in xmlInputString, because the ALMA API will automatically copy and paste the subject class and classification number from BIB 050 or 090 field into the sub field h in the holdings record, copy and paste cutter number and publication year from BIB 050 or 090 field into the sub field i in the holdings record.
Put your library API key into the appropriate place shown as follows.
Please use a small group of MMS IDs as a test first before applying for hundreds of MMS IDs.
The code was passed  in Windows 7 SP1 and JAVA 11.0.11.
I hope this will help.
Andy Tang

Leave a Reply