‘====================================================== ‘FUNCTION/SUB: Marc_Break ‘Description: Encapsulates the MarcBreaker functions ‘====================================================== Function Marc_Break(source, dest) Dim obj_MB Dim lret if fso.FileExists(source)=false then msgbox “Local MarcFile Could not be located. Quitting” wscript.quit end if Set obj_MB=CreateObject(“MARCEngine5.MARC21”) lret=obj_MB.MarcFile(source, dest) set obj_MB=Nothing Marc_Break=lret end Function
Dim lobj_Z3950 Dim lstring Dim sfilename sfilename = “output.mrc” Set lobj_Z3950 =createObject(“MARCEngine5.Query”) lobj_Z3950.Database = “LCDB_MARC8” lobj_Z3950.Host = “lx2.loc.gov” lobj_Z3950.Port = 210 lobj_Z3950.Syntax = “MARC21” lobj_Z3950.Start = 0 lobj_Z3950.Limit = 1 lstring = lobj_Z3950.Z3950Search(“@attr 1=4 ” + chr(34) + “building digital libraries” + chr(34), -1) Set lobj_Z3950 = Nothing ‘show the record msgbox(lstring) bsuccess = Write2File(sfilename, …
Continue reading ‘Making a Z39.50 Request via COM’ »
File can be downloaded from: add_field ************************************************************* ‘BEGIN ‘ADD:ADDɕɕ=500 \\$aTest Field1. ‘SORT:true ‘END ‘======================================================== ‘ Generated 3/23/2015 by the MarcEdit Script Maker. ‘ Description: The MarcEdit Script Maker is an separate but add-on ‘ utility that can be used to quickly generate vbscripts to process ‘ MARC files. ‘ ‘ Author: Terry Reese ‘ Oregon …
Continue reading ‘Add a New Field via COM (script maker Example)’ »
Dim objMM Dim xmarc dim path path = “C:\Users\Terry\OneDrive\MarcEdit Downloads\xmltest\” path2 = “C:\Users\Terry\Desktop\” Set objMM=CreateObject(“MARCEngine5.MARC21”) dim fso dim f1 Set fso = CreateObject(“Scripting.filesystemobject”) Set f1 = fso.opentextfile(path + “enc_1.txt”, 1) xmarc = f1.ReadAll f1.close Dim output output = objMM.ReadMARC21XMLStream(xmarc,”C:\Program Files\MarcEdit 6\xslt\MARC21slim2Mnemonic.xsl”,0,2) tmp = output do if len(tmp) > 500 then msgbox(mid(tmp,1,500)) tmp = mid(tmp, 500) …
Continue reading ‘MARCXML COM Stream Example’ »
Dim obj_MB Set obj_MB=CreateObject(“MARCEngine5.MARC21”) dim rec dim streamreader set streamreader = obj_MB.OpenReadStream(“C:\Users\Terry\Desktop\z3950.mrc”, 1252) rec = obj_MB.ReadAll(streamreader) obj_MB.CloseReadStream(streamreader) lret=obj_MB.Export_Tabbed_MARC_Stream_2(rec, “020$a,245$a,245$b,100$a,100$b,260$a,260$b,260$c,020$z,960$s,960$u,960$w,001″, 1) msgbox (lret + ” finished”)
Generally, it’s not a good idea to globally strip whitespace from data being transformed into MARC. The spacing is sometimes important. However, I understand there are times when this is desireable. In MarcEdit, if you use the <xsl:strip-whitespace> command, you will get an error. It will look something like this: This is due to how …
Continue reading ‘XSLT processing — xsl:strip-whitespace issues’ »
Linked Data Command Line Options: The command line tool is probably one of those under-used and unknown parts of MarcEdit. The tool is a shim over the code libraries – exposing functionality from the command line, and making it easy to integrate with scripts written for automation purposes. The tool has a wide range of …
Continue reading ‘Building linked data links via the command-line’ »
In creating the linked data platform in MarcEdit, I made the decision that nearly all interactions with linked data endpoints and bibliographic data would be controlled via a rules file. The reason for this approach is that rules files could then be created for different flavors of MARC and work equally well, without having to …
Continue reading ‘Editing MarcEdit’s Linked Data Rules File’ »
Since MarcEdit 4.x, MarcEdit has targeted the Arial Unicode MS font as the primary rendering font used for the application. This was done primarily because it was easy to get due to MS Office, readily available, and provided some of the best coverage for multi-byte language. However, as of Office 2016, Microsoft is no …
Continue reading ‘Replacement Unicode Fonts’ »
Related Article: Replacement Unicode Fonts MarcEdit has been designed to take advantage of the host operating system’s accessibility options and naturally scale up or down based on the font size and face selected in the preferences. By default, MarcEdit attempts to render all data in the Arial Unicode MS font. This font, which has been available …
Continue reading ‘Updating Fonts and Window Sizes in MarcEdit’ »