MarcEdit has two COM and .NET API for providing Z39.50 searching — one API provides access to a Single Query and one a batch query: [Z3950Search & BatchZ3950Search]. Both of these options deposit returned data into a file. However, I’ve been asked if the single search can also provide an array of objects. COM doesn’t quite work that way when dealing with VBscript, but I have added a new API to provide an array of string objects. This way, you can enumerate through the results, rather than having to work with data stored in a file. The new API is called Z3950SearchEx. Here’s an example:
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 lstring = lobj_Z3950.Z3950SearchEx("digital", 4) Set lobj_Z3950 = Nothing for x=0 to Ubound(lstring) msgbox lstring(x) next
–TR