Macros
This documentation already assumes you have read the documentation about or are familiar with writing an OCLC Macro Language (OML) macro that adds a field to a bibliographic or authority record in the Connexion Client. If not, please see: Adding a Field to a Bibliographic Record.
Because subfields in Connexion use a special delimiter character (?) that cannot be represented in the OCLC Connexion Macro Editor and Debugger, a special function must be used to include this delimiter character in the field data sent to Connexion while using a CS.AddField command. That function is called the Chr function. The Chr function takes an ANSI code value and converts it into its corresponding character. To represent this special delimiter, the syntax in our code should be Chr(223).
Since we have to use this function to output this character, we cannot simply insert Chr(223) between our two quotation marks because it will output exactly that. Instead we need to put quotes around the actual textual portions of the field and concatenate them together with the Chr function between them using the "&" symbol. See the following examples:
WRONG: CS.AddField 1, "24500Title : Chr(223)b subtitle."
Output: 245 00 Title : Chr(223)b subtitle.
RIGHT: CS.AddField 1, "24500Title : " & Chr(223) & "b subtitle."
Output: 245 00 Title : ǂb subtitle.
WRONG: CS.AddField 1, "541 Chr(223)3 Rare Books copy: Chr(223)c Gift of Chr(223)a Skippy's Sliding Board Company; Chr(223)d 2003. Chr(223)5 PSt
Output: 541 Chr(223)3 Rare Books copy: Chr(223)c Gift of Chr(223)a Skippy's Sliding Board Company; Chr(223)d 2003. Chr(223)5 PSt
RIGHT: CS.AddField 1, "541 " & Chr(223) & "3 Rare Books copy: " & Chr(223) & "c Gift of " & Chr(223) & "a Skippy's Sliding Board Company; " & Chr(223) & "d 2003. " & Chr(223) & "5 PSt"
Output: 541 ǂ3 Rare Books copy: ǂc Gift of ǂa Skippy's Sliding Board Company; ǂd 2003. ǂ5 PSt
Note: The special delimiter character used in Connexion looks like a double-cross, but is equivalent to the Unicode character ǂ with decimal value 450 (hexadecimal 01C2) and is referred to in the Unicode community as "Latin letter alveolar click."