In early December 2012, I added a new API to the MarcEdit API that allowed a single Z39.50 Search to provide the results back as an array of Objects (rather than just a big string dump). You can read more about that at: https://blog.reeset.net/archives/1133. I’ve now added the compliment function for the BatchZ39.50 function: BatchZ3950SearchEx. This function accepts an array of search terms, and will return a multi-dimensional array of results. You can see an example of the use below.
Dim lobj_Z3950 Set lobj_Z3950 =createObject("MARCEngine5.Query") With lobj_Z3950 .Database = "VOYAGER" .Host = "z3950.loc.gov" .Port = 7090 .Syntax = "MARC21" .Start = 0 .Limit = 5 End With Dim lstring Dim search_string(2) search_string(0) = "digital" search_string(1) = "libraries" lstring = lobj_Z3950.BatchZ3950SearchEx(search_string, 4) Set lobj_Z3950 = Nothing msgbox cstr(Ubound(lstring,1)) for x=0 to Ubound(lstring,1) for y=0 to Ubound(lstring(x,1)) msgbox "Search: " & lstring(x,0) & vbcrlf & lstring(x,1)(y) next next
–tr
Comments
One response to “MarcEdit API Addition: BatchZ3950SearchEx”
[…] Enhancement: New MarcEdit API — BatchZ3950SearchEx. Returns results as an array of objects, rather than in a file. You can read more about it here: https://blog.reeset.net/archives/1139 […]