Macros for the Connexion Client
(version 2.6.3 and earlier)

For help in loading these macros into Connexion, see my step-by-step instructions.

 


Utility functions

NikAdds!IncludeFunctions [Macrobook file (not text)]
A macrobook containing a macro of various handy functions that can be called by other macros. To do so, add '$Include "NikAdds!IncludeFunctions" before Sub Main in your macro. The Declare Function statements at the start of the macro lists the functions and their arguments. These functions include, but are not limited to: To load this macrobook into Connexion, simply save the file to your hard drive in the Macros directory in your Connexion program directory (usually C:\Program Files\OCLC\Connexion\Program\Macros).

 


Macros

082to092 [Text]
Copy the call number from an 082 to the 092 field. The macro strips out any subfield codes and LC breakpoints from the call number in the process.
508-511to700 [Text]
Take all names from existing 508 or 511 fields (or both), and add a 700 field for each name. The macro relies on the presence of commas and semi-colons to determine where a name starts and stops, so there may often be "false" fields that need to be deleted, and some names (especially those that should be in direct order, or where there are multiple surnames) will need to be altered to reflect the authorized form of the name.
Add007 [Text]
Creates an 007 tag based on user input.
AddCommon33X [Text]
Use dropdown selections of just the most common values to create & insert RDA 33X tags.
AddCommon34X [Text]
Select the most common subfield values to create & insert RDA 34X tags.
AF-SeriesBrowse [Text]
If you put the cursor anywhere in a 440 or 490 field, then run the macro, the macro will use the contents of the field to browse the series title in the Authority File.
AlifAyn2Apostrophe [Text]
Change all alif and ayn characters to apostrophes in the current bibliographic or authority record.
Auth046 [Text]
Copy dates from 100 $d of an authority record to 046 $f and/or $g.
BatchAction [Text]
Execute OCLC actions on a list of records.
BatchChange [Text]
Add, delete, or find & replace fields, subfields, or data almost anywhere in the variable fields of a list of records. (Note: This macro has not yet been fully bulletproofed & rendered "smart" enough to handle certain common situations. For example, when adding a subfield to the end of a 6XX field, if the existing field ends with a period, the macro is not yet smart enough to move the period to the end of the new subfield. Therefore, this should be considered a work in progress rather than a completed macro. I will update the file here when I have time to alter the macro.)
CatME2Cnx [Text]
Copy an open NEW OCLC bib or authority record from CatME to Connexion. Does not copy full records (export, then import those instead). It should correctly handle flipping diacritics from before the letters they modify to afterwards. (Note: Due to a bug in the CS.FixedFieldPosition command, your Connexion display will always display the fixed fields in tagged rather than mnemonic format after running this macro. To switch back to the standard mnemonic display when you're done copying in-process records, go to the View menu, select OCLC Fixed Field, then select Top or Bottom.)
Cnx2XL [Text]
Copy the author (if any), title, OCLC number, record format, and today's date from a displayed record into an existing Excel file, in order to keep cataloging statistics.
CopyMultiple [Text]
Copy multiple, non-contiguous fields from a displayed record for later pasting into another record, a text document, or an e-mail.
CvtDiacritics [Text]
Replace all Latin-1/Unicode single-character letter+diacritic combinations in the current MARC field with the proper MARC21 separate letters and diacritic characters.
Enhance505 [Text]
Automatically add enhanced subfields to an unenhanced contents note. Note that, because of variations in the way different catalogers enter 505s, the results are not always accurate, especially where section names (e.g. "Cassette 1") and names or titles in parentheses are concerned, so be sure to double-check the results before taking final actions on the record. This macro requires the NikAdds macrobook (available above).
GenerateAuthoritySupplNLat [Text]
This macro (adapted from one created by Hideyuki Morimoto at Columbia University) uses the OCLC-supplied macro for creating an authority record from a heading in a catalog record and then adds non-Latin vernacular data from the catalog record to the authority record. It only works with linked headings where the non-Latin vernacular heading is immediately before the transliterated Latin heading, and even then, only when the cursor is in the transliterated Latin heading.
GetControlledLinks [Text]
Look up & download authority records for all headings in the current bibliographic record.
MacroSynch [Text]
Check whether the versions of macrobooks on a shared drive are newer than the local versions, and if they are, automatically copy down the new versions. Note: This macro has to be in its own macrobook, because you can't overwrite a book with a macro that's currently running.
NextAF [Text]
When looking at a record from an authority file brose, this macro goes forward to the next record in the browse list. (Note: Due to a bug in Connexion, this macro will not work properly if the next item is supposed to open up an expanded browse list instead of a single record, but it will work properly if the current record was opened from an already-open expanded browse list. In other words, this macro will work most of the time, but not all of the time.)
PrintRecordNoDiacritics [Text]
Dump a record to the Windows default printer, with all diacritics converted to printable characters. (If the default printer is "Generic/Text Only", this enables speedy draft printing of records.)
ReSaveFile [Text]
Resave all records in the online cataloging save file. If you are currently viewing a save file list that does not include every record in the save file, then the macro will only resave the listed records. If you are not currently viewing a save file list, the macro will automatically search for all records in the save file. If you are not currently online, the macro will automatically log on first.
SaveRecordAsFile [Text]
A Connexion version of Passport's SaveScreen macro, this takes the currently-displayed record and saves it to a text file in the Connexion program directory.
SearchHeading [Text]
Search WorldCat for other bibliographic records containing the heading where the cursor currently is.
SirsiCopy [Text]
Copy selected variable field data from Connexion to the Windows Clipboard, reformatted for later pasting into Sirsi's Workflows product. This macro may work with any other vendor's catalog software, if pipes (vertical bars) are used for delimiters and no spaces are present on either side of a subfield delimiter or letter.
SirsiPaste [Text]
Reformat and paste at the current cursor position data already copied from Sirsi's Workflows product to the Windows Clipboard. This macro may work with any other vendor's catalog software, if pipes (vertical bars) are used for delimiters and no spaces are present on either side of a subfield delimiter or letter.
SirsiCopyUnicode [Text]
Copy selected variable field data from Connexion to the Windows Clipboard, reformatted as Unicode text for later pasting into Sirsi's Workflows product. This macro may work with any other vendor's catalog software, if pipes (vertical bars) are used for delimiters and no spaces are present on either side of a subfield delimiter or letter. (Note: Beta version; seems to work for Latin text, but does not yet work for non-Latin vernacular text)
SirsiPasteUnicode [Text]
Reformat and paste at the current cursor position Unicode data already copied from Sirsi's Workflows product to the Windows Clipboard. This macro may work with any other vendor's catalog software, if pipes (vertical bars) are used for delimiters and no spaces are present on either side of a subfield delimiter or letter. (Note: Beta version; seems to work for all text, but not yet fully tested)
Split041 [Text]
Split up an 041 field so that each language code is in its own subfield.
StartFromScratch [Text]
Delete all but the system-supplied fields from a minimal Encoding Level 3 record and replace it with workform data, so that enhancing the record is more like doing original cataloging.
Unicode2ALA [Text]
After having pasted data into Connexion from a web page an e-mail, or some other document, change most character+diacritic Unicode characters in the current field to separate character & diacritic characters and change most Unicode punctuation marks to ASCII punctuation marks. (NOTE: This is still a work in progress; it currently only handles punctuation and the Latin-1 character+diacritic combinations, not the other Latin character+diacritic combinations that are supported by Unicode; so while it will work for most Western European languages, it won't work for other languages and some transliterated data.)
Transliteration (Last modified: 16 Oct 2016) [Zipped macrobook file]
This macrobook contains a suite of macros: Each macro transliterates a field to or from a particular non-Latin script.

To use the ***2Latin macros, put the cursor in a field containing script using that alphabet, then run the macro. The macro will attempt to transliterate the data, will add the Romanized data in a new field, and will link the new field to your existing field.

To use the Latin2*** macros, put the cursor in a field containing Romanized data, then run the macro. The macro will attempt to un-transliterate the data, will add the vernacular characters in a new field, and will link the new field to your existing field. These macros will attempt to transliterate all Latin-alphabet text in a field (except for subfield indicators), so you may have to manually change some subfields back to Latin; for example, GMDs.

In both cases, you will have to double-check the results, because the macro cannot handle every possible case and exception. This is in part because some vernacular characters on the transliteration tables are not yet valid for use in MARC records, and some valid MARC characters are not included in the Arial Unicode MS font (nor most other Unicode fonts); these will be transliterated by the macro as fill characters (a black rectangle). In these cases, you must manually edit the transliterated field before the record will validate. You may have to use character descriptions instead of the actual characters, as instructed in the Connexion help file; for example, when working with MARC8 rather than Unicode, the Azerbaijani schwa should be entered as "[Schwa]" or "[schwa]" (depending on case) in an otherwise vernacular field, as that character is not valid for use in MARC8 records.

Starting in 2016, OCLC now considers all of Unicode to be valid for use in WorldCat bibliographic records, though authority records still only support MARC8-compatible Unicode characters. Several of these macros will need to be updated as a result. The Latin2Cyrillic macro is the first; it now has two versions here: The standard version, which uses a wider range of Unicode characters, and the original MARC8 version, which is limited to those Cyrillic characters that are supported by MARC8.

With several of the macros, you will be asked to select the transliteration table for a particular language using that writing system you wish to use. If you want to change the default selections (so that you can simply press Enter most of the time), you can do this by editing the indicated values just after "Sub Main" in the relevant macro.

If you have problems unzipping the file, here is the plain macrobook file, which you should be able to simply download and move into your Macros directory. However, because the file is so large, and I do not want the number of download requests to overwhelm my daily limits, I ask you to please instead download the zipped version above unless absolutely necessary.

Korean2Latin [Text]
This macro (also available in the Transliteration macro book) transliterates Korean hangul characters to Latin characters. Please note that you will have to double-check the results of the macro, in large part because accurate transliteration of Korean involves understanding the meaning in context of the text being transliterated--a capability that is far beyond what a relatively simple macro can do. The macro will not insert spaces between lexical units, will not insert hyphens in names, will not handle consonant changes related to parts of speech or place in a sentence, and will not properly handle most other such special cases, but it will hopefully provide a good enough starting point to ease the transliteration work.

This version is a first draft at best; while there are many things it can't do, there may be some regular patterns that it currently misses that it could handle better. If you find any of the latter, please let me know.

Devanagari2Latin [Text], Latin2Devanagari [Text]
These two macros (also available in the Transliteration macro book) transliterate Hindi, Marathi, Sanskrit, or Prakrit characters to Latin characters or vice versa. Please note that you will have to double-check the results of these macros--especially the Latin2Devanagari macro--because there are cases of multiple characters that are transliterated identically (m and n plus various diacritics), and there are some characters in the ALA-LC charts for Hindi and Sanskrit/Prakrit that are not valid Unicode characters and thus must be entered some other way. (Such as entering the character name in square brackets.) The macro looks at the Lang fixed field to determine which language to use, and defaults to Hindi if the Lang field is anything else. If you chiefly work with Marathi or Sanskrit, the default can easily be changed by modifying the line in the macro that is marked for that purpose.
Latin2AboriginalSyllabic [Text]
(Currently in testing; Inuktitut only at this time.)
Latin2Cherokee [Text]
(Currently in testing.)
Syriac2Latin [Text]
This macro (also available in the Transliteration macro book) transliterates Syriac characters into Latin characters. Please note that you will have to double-check the results of the macro, largely because this is a first draft at best, and has not been tested against expert transliterations to make sure it operates correctly.
Thai2Latin [Text], Latin2Thai [Text]
These two macros (also available in the Transliteration macro book) transliterate Thai characters to Latin characters and vice versa. Please note that you will have to double-check the results of the macros, in large part because accurate transliteration of Thai involves understanding the meaning in context of the text being transliterated, particularly where the many homophones in Thai are concerned--a capability that is far beyond what a relatively simple macro can do. While both macros are programmed to handle many (but not all) of the specific cases described in the ALA-LC transliteration rules, there are many other cases they cannot properly handle. At best, they will hopefully provide a good enough starting point to ease the transliteration work.

For Thai2Latin, the results will be somewhat more accurate if you insert spaces in the original Thai text wherever there should be spaces in the transliteration, then remove those spaces from the original Thai text after you are done with the macro.

NOTE: These versions are currently a first draft at best; I've tried to make them handle as many common cases as I can, there may be some regular patterns or extremely common words that one or the other currently miss that they could handle better. If you find any of those cases, please let me know.

Urdu2Latin [Text], Latin2Urdu [Text]
These two macros (also available in the Transliteration macro book) transliterate Urdu characters to Latin characters and vice versa. Please note that you will have to double-check the results of the macro, due to the number of letters which are transliterated differently depending on their context and other such romanization exceptions.

NOTE: These versions are currently a first draft, if they can even be called that; they do not yet handle even those common exceptions that they possibly eventually could. They seem to work well enough as far as the basic LC transliteration table goes, but you will almost certainly have to manually correct the results.


Return to the Main page.