|
|
Basics:
Use Macros
Judy Barnes
Last revised 2008
Introduction to OCLC Macro Language for Connexion client
Macros are short programs you write to automate routine tasks. Macros are built from commands. Each command does one step in the procedure you want to run automatically. Creating and using macros is optional and requires some understanding of BASIC programming language. The client supports macros written using OCLC Macro Language (OML), which provides:
- Standard BASIC functions and statements
- Macro commands developed specifically for the client
Why use macros?
Using macros can help to:
- Reduce the number of keystrokes and mouse clicks by running repetitive processing steps automatically
- Standardize procedures to reduce errors and inconsistencies
- Decrease staff time required for routine tasks
OCLC-supplied object class and variables
- OCLC supplies the object class Connex.Client. Commands in OML macros automate Connexion client actions by accessing a subset of client functionality through this object class, which is the interface between the client functionality and OML.
- To gain access to the functions provided by Connex.Client, an OML macro contains two lines that do the following:
- Define the object variable CS by which to reference Connex.Client:
Dim CS as Object.
- Set CS to reference an instance of the object class Connex.Client:
Set CS = CreateObject("Connex.Client").
Why use an object?
The only way to create a macro that automates Connexion client operations is to use the variable CS as an instance of the class Connex.Client. You can then use the capabilities of that class of object to make the macro work. By using the appropriate object, you can, for example, write a macro to log on to Connexion, automate a search, modify a record, display a record from a list, or take an action on a record.
How to use a client object
The tasks an object can do are called methods or member functions of the object. OML Help uses the term commands for the methods of the client object class.
For a list of commands for use in client macros, see "List of Connexion client macro commands."
Syntax for client macro commands
- Command syntax links client commands to the Connex.Client object.
- At the beginning of a macro, define the object variable CS to represent the object.
- For each macro command, add the prefix CS. to the command name to reference the required object through its predefined object variable, CS.
Example:
dim CS as Object
set CS = CreateObject("Connex.Client")
CS.WindowCount (Returns the number of open record and list windows)
- At the beginning of a macro, name and declare data types for variables to represent the values you supply as arguments (for example, line numbers and text strings) for carrying out the commands.
Example:
dim CS as Object
dim sData as String
dim n as integer
set CS = CreateObject("Connex.Client") (Sets sData as a string of characters and n as an integer)
Return values from client macro commands
- Many client macro commands are functions that return a value of TRUE (if the command executes successfully) or FALSE (if the command fails).
- For these commands to work correctly, you must assign a variable to store the return values. As each command executes, the stored value is updated.
- Optional. You can include If . . Then . . Else statements or other code that checks the value of this variable and, based on the result, displays messages or branches to different sections of the macro.
If...Then...Else executes alternative blocks of program code based on one or more expressions.
If condition Then then_statement [Else else_statement] [bracketed parameter is optional]
Where:
-condition is any expression that evaluates to TRUE (non-zero) or FALSE (zero)
-then_statement is any valid single expression
-else_statement is any valid single expression
-expression is any expression that evaluates to TRUE (non-zero) or FALSE (zero)
-statement_block is 0 or more valid expressions, separated by colons (:) or entered on separate lines
Note: When multiple statements are required in either the Then or Else clauses, use the block version (Syntax B) of the If statement.
- Use the following syntax to specify the variable BOOL to store the return value of each command:
Note: Standard OML commands do not use the CS. prefix.
Examples: Set If . . Then . . Else MsgBox
OCLC-supplied macros
OCLC supplies several widely used macros:
- FourFig and Sanborn in a macro book file named Dewey.mbk for adding a Cutter number to a Dewey classification number. See instructions for using the Cutter macro in Cataloging, Print Labels and Accessions Lists, "Print labels."
- GenerateAuthorityRecord named OCLC.mbk for generating an authority record from a name heading in a bibliograhic record. You can run the macros from Tools > Macros > Manage.
OCLC provides additional macros. The following table lists all OCLC-supplied macros supplied in OCLC.mbk, describes the purpose of each, and gives details for using them:
| OCLC macro name and purpose |
How to use |
Add&Edit007
Adds or edits field 007 in a bibliographic record via a menu |
To add field 007:
Retrieve a bibliographic record and run the macro, but do not place the cursor within any existing 007 field.
To edit field 007:
Retrieve a bibliographic record and run the macro after placing the cursor within any existing 007 field to be edited. |
AddAuthority6xx
Adds a 6xx field template to an authority record via a menu |
To add a 6xx field template
- Retrieve an authority record or workform and run the macro.
- Choose an appropriate field from the menu and click OK.
Result: The macro adds the field to the record and places a fill character at the point in the field where it needs to be reviewed and further edited. |
AddSerialNotes
Adds a note field template to a serial bibliographic record via a menu |
To add a note field template
- Retrieve an serial bibliographic record or workform and run the macro.
- Choose an appropriate field from the menu and click OK.
Result: The macro adds the field to the record and places a fill character at the point in the field where it needs to be reviewed and further edited. |
BrowseAuthorityIndex
Begins a browse search in the authority indexes based on a heading in a displayed authority or bibliographic record |
To begin an authority browse search:
Retrieve an authority or bibliographic record or workform, place the cursor in a heading or title field you want to browse, and run the macro. |
BrowseBibliographicIndex
Begins a browse search in the bibliographic indexes based on a heading in a displayed authority or bibliographic record |
To begin a bibliograhic browse search:
Retrieve an authority or bibliographic record or workform, place the cursor in a heading or title field you want to browse, and run the macro. |
Generate034
Generates field 034 based on data in field 255 in the same bibliographic record |
To generate field 034:
Retrieve a bibliographic record with field 255 and run the macro.
Note: Field 255 must be correctly formulated per AACR2 rules and must use the degree sign, the miagkii znak, and the tverdyi znak to indicate degrees, minutes, and seconds in any coordinates. |
Generate043
Generates field 043 based on data in 6xx fields in the same authority or bibliographic record |
To generate field 043:
Retrieve an authority record or workform that contains field 151 and/or 78, or retrieve a bibliographic record or workform that contains LCSH, LC Children's, MeSH, or Canadian subject headings, and run the macro. |
Generate891
Generates a pair of 891 fields based on frequency and numbering data in the same bibliographic record |
To generate a pair of 891 fields:
- Retrieve a serial bibliographic record or completed workform and run the macro.
- Edit the resulting fields as appropriate.
|
GenerateAuthorityRecord
Generates a name authority workform based on a heading in a displayed bibliographic record (see detailed instructions in Authorities, Create Authority Records, "Generate an authority record from a name heading in a bibliographic record...") |
To generate an authority record:
Place the cursor within a valid heading field of a bibliographic record and run themacro. |
GenerateESerial
Creates a serials workform to represent an online version of a serial based on the print, microform, or CD-ROM version of a bibliographic record for the same title |
To create a serials workform:
Retrieve a bibliographic record for a serial and run the macro. |
GeneratESerialCONSER
Creates a CONSER-level serials workform to represent an online version of a serial based on the print, microform, or CD-ROM version of a bibliographic record for the same title |
To create a CONSER-level serials workform:
Retrieve a bibliographic record for a serial and run the macro. |
InsertHeading
Inserts a displayed authority record heading into a previously displayed bibliographic record heading field |
To insert a heading:
- Retrieve a bibliographic record and place the cursor in a heading field.
- Search the authority file manually or via the BrowseAuthorityIndex macro for the corresponding heading.
- Once the appropriate authority record is displayed, run the macro.
Result: The macro compares the displayed authority heading with the heading in the previously displayed bibliographic record and inserts it into the bibliographic record if there are differences |
OCLC may supply additional macros or modify existing macros in the OCLC.mbk book file in future versions of the client.
Caution for retaining your own macros when upgrading to the next client version:
- When OCLC adds or modifies macros in Dewey.mbk and/or OCLC.mbk, these files are overwritten when you upgrade to a new version of the client.
- You will lose your customized macros if you store them in either of these files when you upgrade. Copy any of your own macros to another macro book that you create or rename the macro book before upgrading to prevent this loss.
OCLC macro book files and macro book files you create are stored in X:\Program Files\OCLC\Connexion\Program\Macros (X = the letter of your hard drive). See more about user file locations in Getting Started with OCLC Connexion Client.
To view the OCLC macros:
| |
Action |
| 1 |
Click Tools > Macros > Manage, click the plus sign (+) next to OCLC to expand the list of OCLC macros. |
| 2 |
In the Macro window under the Macros list, click the plus sign (+) next to OCLC to expand the list of macros OCLC supplies. |
| 3 |
Click the name of a macro to see its description in the Description box, or double-click the name to open and view the macro in the Macro Editor. |
Help for using client macros
Caution for Windows Vista users:
- Older Help files (*.hlp) linked from the main Connexion client Help file (*.chm) are unavailable under Windows Vista unless you download the discontinued Help engine WinHlp32.exe from the Microsoft Web site at:
http://go.microsoft.com/fwlink?LinkID=82148 http://support.microsoft.com/kb/917607.
- Only the Standard BASIC guide and Macro Editor and Debugger Help topics are affected. These topics are in two help files, osbl5x.hlp and osbi5x.hlp.
- Client macro command-specific Help is in the main help file (clienthelp.chm) and is not affected .
- For complete information, see Windows Help program (WinHlp32.exe) is no longer included with Windows [Vista] on the Microsoft Web site at:
http://support.microsoft.com/kb/917607.
The client provides separate but interlinked Help systems that cover macros
- OML and Basics Help (osbl5x.hlp)
- Macro Editor and Debugger Help (osbi5x.hlp)
- Client-specific macro commands in the main client Help (clienthelp.chm)
- The Help files are located in D:\Program Files\OCLC\Connexion\Program.
To open OML Help on standard BASIC:
- Click the Client Help button in any client Help topic on macros. Then, in the OCLC Macro Language Help window, click the link OML Standard BASIC Reference.
Or In the Macro Editor and Debugger Help window, click , and then click the link BASICS. Or In the text of a macro in the Macro Editor, right-click any BASIC language keyword (such as sub) to open a topic describing the keyword.
OML Help provides information on:
- Syntax, usage tips, and examples for standard OML statements and functions
- Overview topics that describe how to use features in OML
- Program examples that illustrate OML functions and statements
To open the Macro Editor and Debugger Help:
- On the toolbar in the Macro Editor and Debugger window, click
.
Note: You open the Macro Editor and Debugger when you create or edit macros.
To open Connexion Client Help topics on using client-specific macros:
- On the Help menu, click Client Help, or click
, or press <F1>. In the Help Contents tab, expand Basics/Use Macros.
Reference table: For diacritics and special characters in data used with macro commands such as CS.GetField or CS.SetField, see a list of codes, "ASCII and hexadecimal codes for diacritics and special characters."
back to top
Use Connexion client macros
Client macro tools
The client provides the following tools for working with macros:
| Macro tool: |
To open, go to: |
|
|
Tools > Macros > Manage The Macro window opens. You can use it as a manager to create, edit, run, delete, and organize macros. |
|
|
Tools > Macros > Manage. Click Organizer The Macro Organizer window opens.
Macros are stored in *.mbk files called books. Using the organizer, you can create or rename macro books, delete a macro or macro book, and move or copy macros among macro books.
Caution Prevent loss of data when moving or duplicating lengthier macros: For moving or duplicating lengthy macros, OCLC recommends copying and pasting directly from one macro to another using the macro editor, rather than using the macro organizer. |
|
|
Tools > Macros > Manage. Click Record. The Record a New Macro window opens. After you enter a name and description for the new macro and click OK, the activities you do in the client are recorded as the new macro. |
|
|
Tools > Macros > Manage. Click Edit.The OCLC Connexion Macro Editor and Debugger opens. You can use it to create, edit, and debug macros.
The Macro Editor has its own Help files. To open:
On the Macro Editor toolbar, click (Help). |
Notes for Windows Vista users:
- Macro (*.mbk) files. See information on the location of Connexion client macro files with Windows Vista.
- Macro Help files. Older (legacy) Help files (*.hlp) for the Standard BASIC guide and Macro Editor and Debugger Help that are linked from the main Connexion client Help file (*.chm) are unavailable under Windows Vista. To use these Help files, you must download the discontinued WinHlp32.exe Help engine from the Microsoft Web site at: http://go.microsoft.com/fwlink?LinkID=82148. For more information, see Windows Help program (WinHlp32.exe) is no longer included with Windows [Vista] at: http://support.microsoft.com/kb/917607. See also Basics, Get Help and Information, "Use client Help" for more details.
How to create macros
There are two ways to create macros for the client. You can:
- Write your own macros in the macro editor, or copy and paste from an existing macro to a new one and then edit the new macro as needed (see "Write macros" immediately following).
Or
- Record macros automatically using the macro recorder: You start the recorder, do a series of actions in a procedure you want to automate (using the mouse or the keyboard), and the recorder writes a macro that captures the procedure. See section titled "Record macros (create automatically)" below.
Note: See a list of client commands that are not available for use in macros you write or record below. The following commands are available for use in macros you write but cannot be recorded: View the next or previous 100 records from a list (View > Previous 100 Records or Next 100 Records).
Write macros
| |
Action |
| 1 |
On the Tools menu click Macros > Manage, or press <Ctrl><Alt><Shift><G>. |
| 2 |
In the Macro window under the Macros list, select the macro book in which you want to create the new macro. You must use macro books to contain macros. Or Create a new macro book in which to store the new macro:
- In the Macro window box, click New Book.
- Type a descriptive name over the highlighted default name New Book.
- Press <Enter>.
You can also use the macro organizer to create a new macro book. |
| 3 |
Click New Macro. |
| 4 |
In the Macro Description window, type a unique description of the macro's purpose. Then click OK or press <Enter>. |
| 5 |
In the text box with NewMacro highlighted, type an appropriate name for the new macro. Press <Enter>. |
| 6 |
Click Edit.
The OCLC Connexion Macro Editor and Debugger opens. Its title bar gives the names of the macro book and macro. In the work area, the start and end text of a macro are provided:
MacroName:[name you typed]
'MacroDescription:[description you typed]
Sub Main()
End Sub
|
| 7 |
Between Sub Main and End Sub, type commands and appropriate comments to create the macro.
- To create a specific instance of the client object class, macros that use client commands must begin with the lines:
Dim CS as Object
Set CS = CreateObject("Connex.Client")
- In macros that use variables (numbers, strings), include lines to declare the data type of each variable to be used in the macro.
Example:
The first part of a macro using the GetField command declares the variable sData as a string to store the text of the specified field:
Dim CS as Object
Dim sData as String
Set CS = CreateObject("Connex.Client")
|
| 8 |
Press <Enter> at the end of each line. Make sure End Sub remains as the last line of the macro. |
| 9 |
On the Macro Editor toolbar, click (Check) to check macro syntax. (See the "Check macro syntax" section below for details.) |
| 10 |
Click (Execute), (Animate), (Step Into), and (Run to Cursor) to test and debug the macro.
For more information, open the OML Macro Editor Help: Click (Help) on the Macro Editor toolbar. |
| 11 |
Click (Save). |
| 12 |
When finished editing, on the File menu click Exit, or press <Ctrl><F4>.
See a detailed macro example below. |
Tips for using the Macro Editor
- Description. Provide an informative description for each macro you create.
- Comments. Include comments in the macro to document what each part of the macro does. Comment lines begin with a single quotation mark (').
Example:
' Get the first item from the first list
If CS.Search("WC", "gon,wi,th,w") > 0 Then
End If
- Open and work with multiple macros:
- To open another Connexion client macro, with the Macro Editor open:
On the client Tools menu, click Macros. The Macros window reopens. Select another macro in the list or create a new one and select it, and then click Edit. The macro opens in a separate window.
- To help navigate among multiple open macros in the Editor:
On the Macro Editor Window menu, click Cascade or Tile, or make a different macro window current (bring it to the top and set focus) by selecting its name in the windows list.
- Help for BASIC keywords. To get a specific Help topic on any BASIC language keyword (such as sub) in a macro in the Editor, right-click the keyword in the macro text.
Reference table: For diacritics and special characters in data used with macro commands such as CS.GetField or CS.SetField, see a list, "ASCII and hexadecimal codes for diacritics and special characters" in "Connexion client macro commands: Edit records."
View or edit macros
| |
Action |
| 1 |
In the Macro window (Tools > Macros > Manage) under the Macros list, click the plus sign (+) next to the macro book that contains the macro you want to edit. |
| 2 |
Select the macro and click Edit. |
| 3 |
In the OCLC Connexion Macro Editor and Debugger window, edit the macro, and then follow steps 9 through 11 of the procedure above for creating a macro |
Check macro syntax
When you create or edit a macro, you must check the macro syntax (click the
Check button on the toolbar. The Macro Editor displays a message on the status bar of the Editor window.
- If the macro contains no syntax errors, the message is: Successfully compiled [macrobook]![macroname].sbl
- If the macro contains syntax errors, the message is: _Error(s) in [macrobook]![macroname].sbl. Lines containing syntax errors are highlighted in red.
To review errors:
| Action |
On the Macro Editor toolbar, click the Next Error button and Previous Error button to move between error lines in the macro. |
To view details of syntax errors:
| |
Action |
| 1 |
On the Macro Editor toolbar, click the Console button .
A new window opens at the bottom of the Editor window, just above the gray message bar. The window displays output from the syntax checker. |
| 2 |
Drag the separator up to expand the console window. Maximize the Editor window to provide more space if needed. |
| 3 |
On the Macro Editor toolbar, click the Check button again.
In the console window, the Editor displays messages that give the line number containing each syntax error (in parentheses following the macro name) and identify the general type of error. |
Macro example
Sub Main()
Dim CS as Object Set CS = CreateObject("Connex.Client")
If CS.Logon("", "", "") = True Then
MsgBox "Logon successful"
End If
CS.Search "WC", "#1"
CS.AddFieldLine "300 Line 10 test", 10If CS.AddField(2, "500 Another test") = True Then
MsgBox "500 field successfull added"
End If
End Sub
This example:
- Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab (leaves logon values blank).
- Searches WorldCat for record number 1.
- Adds a new field 300 in the tenth line of the record (inserted as the tenth variable field) with no indicators (two spaces between the tag number 300 and the text of the field). Adds the text Line 10 test to the field. (No confirmation message.)
- Adds a second instance of repeatable field 500 (that is, adds a new field 500 below the first existing field 500) with no indicators and the text Another test. If the action is successful, returns the confirmation message 500 field successfully added.
See a complete list of client commands in "List of Connexion client macro commands." See detailed descriptions and examples for each command in sections organized by function.
Include macros in another macro
Including macros in a macro lets you:
- Reuse macros you developed and tested as building blocks for more complex macros
- Insert standardized elements in multiple macros (for example, declarations of variables, frequently used subroutines, or a function library)
- Avoid the errors and repetitive debugging that result from recreating existing code
You can:
- Run a macro from another macro:
- The RunMacro command executes a specified macro from within another macro. When the called macro finishes running, execution of the calling macro resumes with the next statement
- Syntax:BOOL = CS.RunMacro("macrobook!macroname")
Tip: For faster execution, locate macro(s) you run using the RunMacro command in the same macro book that contains the calling macro(s).
Limitation:RunMacro does not include code from the specified macro in the compile process. The called macro is treated as an external "black box."
- Include code from another macro in compile:
- The $Include metacommand tells the OML compiler to merge code from another macro at compile time. Included code becomes part of the macro that contains the $Include command. Functions, subroutines, and variables in the included code become available for use at any time during the main macro's execution.
- Syntax:'$Include: "macrobook!macroname"
- Correct OML syntax: The topic describing $Include in OML Standard Basic Language Reference Help gives the syntax for including a file by specifying path (drive and folder) and file name. This syntax does not work in client macros. You must specify the macro to include as "macrobook!macroname".
Tip: Place the $Include metacommand before the main procedure (Sub Main() ... End Sub) of the macro if the code to be included contains global components such as declared variables, functions, or subroutines.
Run macros
| |
Action |
| 1 |
In the Macros list of the Macro window (Tools > Macros > Manage), click the plus sign (+) next to the macro book that contains the macro you want to run. |
| 2 |
Select the macro. |
| 3 |
Click Run. |
Tip: You can also run a macro by assigning and using a keystroke shortcut or by assigning a user tool button and adding it to the toolbar. See procedures in "Customize keystroke shortcuts for menu items, macros, or characters" and "Assign custom user tools" in Basics/Set Options and Customize.
Stop macros
| Action |
| To stop a macro from running, on the Tools menu, click Macros > Stop, or press <Ctrl><Alt><Shift><T>. |
Delete macros
| |
Action |
| 1 |
In the Macro window (Tools > Macros > Manage) under the Macros list, click the plus sign (+) next to the macro book that contains the macro you want to delete. |
| 2 |
Select the macro you want to delete. |
| 3 |
Click Delete. Click Yes to confirm or No to cancel. |
Organize macros and macro books
- You create macros only within a macro book. Macro book files use the extension *.mbk.
| |
Action |
| 1 |
In the Macro window (Tools > Macros > Manage), click Organizer. |
| 2 |
In the Macro Organizer window, you can:
- Create a macro book: Click New Macro Book and follow steps 4 and 5 in the procedure above for creating macros.
- Rename a macro book: Select a macro book. Click Rename Macro Book, and type a new name over the old name.
- Delete a macro book: Select a macro book. Click Delete. Click Yes to confirm or No to cancel.
- Move or copy a macro book:
-
To move or copy a macro book to or from another location, change the location for Macro Directory 1 and/or Macro Directory 2. Click the arrow to open the Current list. Select the drive and then the folder to move or copy to or from.
Default location: X:\Program Files\OCLC\Connexion\Program\Macros\, where X is the letter of your hard drive
- Select the macro book you want to move or copy and click Move or Copy.
The highlighted macro book is moved or copied from its current location to the location shown under Current Directory in the opposite list area
- Move or copy a macro between macro books:
- To move or copy a macro book to or from another location, change the location for Macro Directory 1 and/or Macro Directory 2. Click the arrow to open the Current list. Select the drive and then the folder to move or copy to or from.
- In either list, select the macro book to which you want to move or copy a macro.
- In the other list, select the macro book from which you want to move or copy a macro. Click the plus sign (+) to list the macros in the macro book.
- Select the macro and click Move or Copy.
Caution for moving or duplicating lengthy macros: To prevent loss of data, OCLC recommends copying and pasting directly from one macro to another using the macro editor rather than using Move or Copy in the macro organizer. |
Caution: OCLC-supplied macro books may be overwritten at upgrade
Do not store customized macros in OCLC-supplied macro books
OCLC-supplied macro book files OCLC.mbk and Dewey.mbk may be overwritten when you upgrade the software to provide you with the most currently available OCLC macros.
If you store customized macros in either of these books, you must rename the existing macro book before upgrading to be sure that the installation does not overwrite it and cause you to lose your own macros.
OCLC recommends that you: Create different macro book file(s) to store macros you create, copy, or record.
Actions not available for macros
You cannot use the following actions in macros you write or record:
- Attach digital files to WorldCat records (Edit menu) (available only to those who have an OCLC logon authorization that includes CONTENTdm, a license to use CONTENTdm, and an established CONTENTdm collection and who use the CONTENTdm hosting service)
- Authorities history records searching and browsing (Authorities > Search menu) and showing distributed vs. superseded versions (Authorities > Show menu)
- Batch set or delete holdings by OCLC number (Batch menu)
- Cancel the last edit in a record (Edit > Undo)
- Check spelling (Tools menu)
- Control a single heading in a record (Edit > Control Headings > Single)
- Convert characters to MARC-8 CJK (Edit > MARC-8 Characters menu)
- Copy data as text (Edit > Copy as Text)
- Copy the OCLC control number by selecting it manually and copying (to record, you must use the Copy Control Number command on the Edit menu)
- Create constant data (Cataloging > Create > Constant Data)
- Create records for electronic resources by extracting metadata (Cataloging > Create > Extract Metadata)
- Customize the toolbar (Tools > Toolbar Editor)
- Delete selected text
- Derive a new constant data record (Edit > Derive > New Constant Data)
- Edit or create 006, 541, or 583 fields using guided entry (Edit > Guided Entry > Edit [or Insert 006, 541, 583)
Note: Existing macro commands can be used, such as SetFieldLine to insert a field and specify data.
- Import records (File > Import Records)
- Insert field 760 - 787 data automatically from a cited record (Edit > Insert from Cited Record)
- Launch local holdings maintenance (Tools menu)
- Launch WebDewey (Cataloging menu)
- Link/unlink non-Latin script fields with equivalent Latin script fields (Edit > Linking Fields)
- Lock linked authority record (Action menu)
- Move the cursor from one record area to another (Edit > Previous Record Area or Next Record Area)
- Open the CJK E-Dictionary (Tools menu)
- Paste Unformatted (Edit menu)
- Print accessions lists (File menu)
- Set a constant data record as the default (Edit > Constant Data > Online > Set as Default)
- Set options in Tools > Options
Note: You can, however, assign keystroke shortcuts to run macros, either by writing a macro using the command AssignMacroToKey or recording a macro while you assign a keystroke from Tools > Keymaps.
- Show default constant data (Cataloging > Show > Default Constant Data; same command on the Authorities menu)
- Show numbers of online save file records by individual statuses (Cataloging > Show > By Online Save File Status; same command on the Authorities menu)
- Transliterate Arabic or Persian (Edit menu)
- Use assigned User Tools (Tools menu)
- Use text strings (Tools menu)
- Verify MARC-8 characters (Edit menu)
Note: You can use the following commands in macros you write, but you cannot record them:
- GetNext100Records (View menu)
- GetPrevious100Records (View menu
back to top
Record macros (create automatically)
Record a macro
The client provides a macro recorder that records the actions in a procedure as you do them, whether you use the mouse to click commands or toolbar buttons, or press shortcut keystrokes, or use a combination of mouse and keyboard.
The recorder writes the macro automatically in the OML macro recorder.
To record a macro:
| |
Action |
| 1 |
On the Tools menu, click Manage, or press <Ctrl><Alt><Shift><G>. |
| 2 |
In the Macro window, click the name of the macro book where you want to store the new macro and then click Record. |
| 3 |
In the Record a New Macro window, enter a unique name and description for the macro. The description displays in:
- The Description box of the Macro window, when you select the name of the macro, to help you remember what the macro does
- At the top of the macro text when you open the macro in the macro editor
|
| 4 |
Click OK to start recording, or click Cancel to close the window without startingrecording.
Result if you click OK:
- The client displays a macro recording toolbar under the client toolbar:
.
- The toolbar contains buttons for (left to right): Pause Recording, Resume Recording, and Stop Recording.
- These commands are also available as commands under Tools > Macros.
|
| 5 |
Carry out the procedure(s) you want to capture in a macro. The client records all actions except those listed in "Non-recordable actions" below. |
| 6 |
Optional: To pause and then resume recording the current new macro:
- On the Tools menu, click Macros > Pause Recording.
Or On the macro recording toolbar, click . Or Press <Alt><T><M><P>.
To resume recording the same macro at the point where you paused:
- On the Tools menu, click Macros > Resume Recording.
Or On the macro recording toolbar, click . Or Press <Alt><T><M><E>. |
| 7 |
When you are finished, to stop recording and end the macro: On the Tools menu, click Macros > Stop Recording Or On the macro recording toolbar, click . Or Press <Alt><T><M><R>. Results:
- The macro is saved automatically.
- You can open the macro to check or edit it. In the Macro window (Tools > Options > Macros > Manage), click the name of the macro you recorded, and then click Edit. The macro opens in the Macro Editor.
- The macro recording toolbar closes.
Note: If you exit the client before you stop recording a macro, the program stops recording for you. You may want to check the macro later for completeness. |
| 8 |
To view, check, or edit the macro, see "View or edit macros" and other sections about checking and editing macros in the topic, "Use Connexion client macros." |
Tips for using the macro recorder
- To copy from field 245, use Find/Replace to find field 245. Then close the box to locate the cursor in field 245.
- You cannot record manually selecting and copying the OCLC number in a record. You must use Edit > Copy Control Number.
- When recording taking an action on a bibliographic record, the macro recorder does not record replacing text by manually selecting and overwriting the text.
back to top
List of Connexion client macro commands
See:
- Commands listed by function
- Commands listed in alphabetical order
List of client macro commands by function
| Log on and off |
| Command name |
Brief description |
| Logon |
Logs on to OCLC Connexion |
| Logoff |
Logs off OCLC Connexion |
| IsOnline |
Checks whether you are currently logged on |
| Search |
| Command name |
Brief description |
| Search |
Lets you use a search string to search an online database
- WorldCat
- Online bibliographic save file
- Online bibliographic constant data
- Local bibliographic save file
- Local bibliographic constant data
- Online bibliographic review records
- Authority File
- Online authority save file
- Online authority constant data
- Local authority save file
- Local authority constant data
- Online authority review records
|
| Browse |
Lets you browse WorldCat for titles or browse the Authority File for headings |
| BrowseAuthorityExpanded |
Lets you expand a browse for a heading by specifying a subheading |
| Edit records |
| Command name |
Brief description |
| AddField |
Adds a field in correct tag order and specifies the order of its appearance among other fields with the same tag number |
| AddFieldLine |
Adds a variable field in a specific field position (line number) |
| CancelChanges |
Cancels all editing changes made to a master record (if from WorldCat or the Authority File) or all changes made since you last saved the record (if from the save file) |
| ControlHeadingsAll |
Controls all controllable headings in a record that are not already controlled |
| UncontrolHeading |
Uncontrols a controlled heading where the cursor is located so that you can edit the heading |
| UncontrolAll |
Uncontrols all controlled headings in the current record |
| IsHeadingControlled |
Determines whether a heading in a specified line of the current record is controlled |
| Copy |
Copies specific text and places it on the clipboard |
| Cut |
Cuts specific text and places it on the clipboard |
| Paste |
Pastes text from the clipboard at a specified insertion point |
| CopySelected |
Copies selected text and places it on the clipboard |
| CutSelected |
Cuts selected text and places it on the clipboard |
| CopyField |
Copies the field where the cursor is located and places it on the clipboard |
| CopyControlNumber |
Copies the OCLC control number (bibliographic records) or ARN (authority records) and places it on the clipboard |
| CursorPosition |
Indicates or changes the position of the cursor in a record, where the cursor position is variable, depending on the presence of data (for use by the macro recorder; use CursorColumn when writing macros) |
| DeleteCurrentField |
Deletes the field where the cursor is located |
| DeleteCurrentWord |
Deletes the word where the cursor is located |
| DeleteToEndOfCell |
Deletes text from the cursor position to the end of the cell in a field |
| MoveFieldUp |
Move the current field above the preceding field |
| MoveFieldDown |
Move the current field below the following field |
| DeleteField |
Deletes a field by specific tag number and, in the case of repeated variable fields, by order of appearance among the other fields with the same tag |
| DeleteFieldLine |
Deletes a field in a specific field position (line number) |
| GetField |
Gets the data for a specific field by tag number and, in the case of repeated variable fields, by order of appearance among the other fields with the same tag |
| GetFieldLine |
Gets the data for a field in a specific field position (line number) |
| GetFieldUnicode |
Works like GetField, but also returns Unicode data in Numeric Character Reference (NCR) form |
| GetFieldLineUnicode |
Works like GetFieldLine, but also returns Unicode data in Numeric Character Reference (NCR) form |
| SetField |
Adds data to a field specified by tag number and, in the case of repeated variable fields, by order of appearance among the other fields with the same tag |
| SetFieldLine |
Adds data to a field in a specific field position (line number) |
| SetFixedField |
Inserts a value in a specific fixed-field element |
| GetFixedField |
Gets the data for a specific fixed-field element |
| FixedFieldPosition |
Returns or specifies how the fixed field displays in a record |
| SetCursorFixedField |
Places the cursor and selects the value, if any, in a specified element of the fixed field |
| GetSelectedText |
Gets selected text from a record (text can span multiple fields) |
| SetSelectedText |
Inserts specific text in a record at the cursor location (text can span multiple fields) |
| InsertText |
Inserts specified text at the cursor location |
| FindText |
Finds and highlights the next occurrence of specified text |
| ReplaceText |
Replaces the highlighted "found" text with specified text |
| ReplaceTextAll |
Replaces all occurrences of "found" text with specified text |
| FindReplaceNextText |
Finds the next occurrence of the specified text and selects it. Another instance of FindReplaceNextText replaces the selected text, moves to the next occurrence, and selects it (combines FindText and ReplaceText commands) |
| Reformat |
Reformats a record (redisplays the record with fields in correct order) |
| Validate |
Validates a record or records selected in a list and returns a list of validation errors, if any (logged on only) |
| CursorColumn |
Indicates or changes the column where the cursor is located in a record |
| CursorRow |
Indicates or changes the row where the cursor is located in a record |
| InsertMode |
Indicates or changes the insert mode (insert mode on or off) |
| ApplyOnlineDefaultCD |
Applies your online default constant data record to the current record or to records selected in a list |
| ApplyOnlineCDByName |
Applies an online constant data record by its specified name to the current record or to records selected in a list |
| ApplyCDFromList |
Specifies a constant data record on a list and applies it to the current record or to records selected in a list
Note: Before version 1.20 of the client, this macro command was named ApplyOnlineCDFromList. Both macro names work with both online and local constant data lists. |
| ApplyLocalDefaultCD |
Applies your local default constant data record to the current record or to records selected in a list |
| ApplyLocalCDByName |
Applies a local constant data record by its specified name to the current record or to records selected in a list |
| ChangeRecordType |
Changes the MARC format of a record (for example, from Books format to Computer Files format) |
See also "ASCII and hexadecimal codes for diacritics and special characters."
Note on macros and non-Latin script data: You can incorporate Unicode character data into macros using GetFieldUnicode and GetFieldLineUnicode. The Unicode characters are converted to Numeric Character Reference (NCR) form.
| Create records |
| Command name |
Brief description |
| OpenWorkform |
Opens a bibliographic workform of a specified type (Books, Computer Files, Continuing Resources*, Maps, Mixed Materials, Scores, Sound Recordings, or Visual Materials)
Or
Opens an authority workform of a specified type (Blank Record, Conference Name, Corporate Name, Geographics, Personal Name, Series, Uniform Title)
*Formerly called Serials; includes serials and integrating resources material types; see description for more information. |
| DeriveNewRecord |
Derive a new record or a new constant data record from an existing record |
| OpenWorkformForDatabase |
Alternative to OpenWorkform command |
| DeriveNewHPBRecord |
A derive command specific to the Hand Press Book database, which is available under contract with OCLC only to members of the Consortium of European Research Libraries (CERL) |
| Take actions on records |
| Command name |
Brief description |
| UpdateHoldings |
Updates holdings for a record or for records selected in a list (adds your OCLC institution symbol)
Or
When offline, marks local record(s) for batch update |
| ProduceAndUpdateHoldings |
Produces cards and accessions lists offline, as specified in your OCLC cataloging profile, and updates holdings for a record or for records selected in a list
Or
When offline, marks local record(s) for batch update and produce |
| AltProduceAndUpdateHoldings |
Updates holdings (adds OCLC symbol) and specifies Ad Produce, All Produce, and/or the number of extra cards to produce for a record or for records selected in a list
Or
When offline, marks local record(s) for batch update and alternate produce |
| DeleteHoldings |
Deletes your holdings (OCLC symbol) from a record or from records selected in a list
Or
When offline, marks local record(s) for batch delete holdings |
| Lock |
Locks a record |
| ReleaseRecordLock |
Releases the lock on a record |
| ReplaceRecord |
Replaces a record or records selected in a list in WorldCat or the Authority File
Or
When offline, marks local record(s) for batch replace |
| ReplaceAndUpdateHoldings |
Replaces a record, or records selected in a list, and updates holdings
Or
When offline, marks local record(s) for batch replace and update |
| SaveOnline |
Saves a record, or records selected in a list, to the online save file |
| SaveToLocalFile |
Saves a record, or records selected in a list, to the local save file |
| DeleteRecord |
Deletes a record, or for records selected in a list, from the online save file |
| Export |
Exports a record or records selected in a list, while logged on or offline
Or
Marks record(s) for batch export if you set the option in Tools > Options > Batch |
| AddToAuthorityFile |
Adds a new record or records selected in a list, to the Authority File (NACO-authorized libraries only)
Or
When offline, marks local record(s) for batch add |
| SubmitForReview |
Sends a bibliographic or authority record, or records selected in a list, to another library for review
Or
When offline, marks local record(s) for batch submit |
| RecallSubmitted |
Withdraws a record you submitted from review |
| AddToOnlineDatabase |
Alternative to AddToAuthorityFile command |
| Work with records, lists, and files |
| Command name |
Brief description |
| SearchList |
Searches for specified data in a list |
| GetListItem |
Display a specified record on a list |
| GetFirstSelectedItem |
Opens the first selected entry in the current list |
| GetNextSelectedItem |
Opens the next selected entry in the current list |
| GetFirstItem |
Selects the first item in a list (can be another list or a record) |
| GetNextItem |
Selects the next item in a list |
| GetPrevItem |
Selects the previous item in a list |
| GetListCellData |
Selects data or value in a cell specified by row and column title |
| GetListCellDataUnicode |
Selects data or value that contains non-Latin scripts in a cell specified by row and column title |
| GetNext100Records |
Displays a list of the next 100 records retrieved from the Authority File or from the bibliographic or authority online save file or online constant data |
| GetPrevious100Records |
Displays a list of the previous 100 records retrieved from the Authority File or from the bibliographic or authority online save file or online constant data |
| CloseList |
Closes a list |
| CloseRecord |
Closes a record |
| GetWindowTitle |
Returns the specified window title |
| ItemType |
Distinguishes the type of record or list for the current window |
| SetTopWindow |
Makes a specified window the current window (top-most or active window) |
| WindowCount |
Returns the total number of windows open in the client |
| CreateLocalFile |
Creates a local file in a specified path or sets an existing local file as the default |
| CopyRecord |
Copies a local file record or records selected in a local file list to another, existing local file that you specify |
| MoveRecord |
Moves a local file record or records selected in a local file list to another, existing local file that you specify. |
| Macro commands for navigating in records |
The following commands move the cursor to a new location. Most correspond to keys on the keyboard. They are used primarily for the macro recorder.
Macro command: Moves the cursor to...
- EndCell: To the end of the current cell
- HomeCell: To the beginning of the current cell
- EndRecord: To the end of the variable fields
- HomeRecord: To the beginning of the variable fields
- KeyUp: One line up
- KeyDown: One line down
- KeyRight: One position to the right
- KeyLeft: One position to the left
- NextSubfield: To the next subfield
- PrevSubfield: To the previous subfield
- DeleteKey: One position to the right and deletes the character or space to the right of the cursor's original position
- Backspace: One position to the left and deletes the character or space to the left of the cursor's original position
|
| Print and work with macros, statuses, holdings, labels, and profiles |
| Macro command: |
Brief description |
| SetMyStatus |
Adds or changes My Status for a record or for records selected in a list |
| SetWorkflowStatus |
Changes the workflow status for a record or for records selected in a list |
| QueryRecordStatus |
Returns a specific status for a record |
| IsHeldBy |
Determines whether a specific OCLC symbol is included in a record |
| Holdings |
Returns a record's holdings list |
| Print |
Prints a record or (available for local save file and local constant data lists only) prints records selected in a list |
| PrintList |
Prints a list or a list of selected entries |
| PrintLabel |
Prints labels based on field data in the record(s) for spine, call number, author, and title |
| PrintLabelEx |
Allows you to edit data for a label for the current record before printing the record |
| GetLabelSpine |
Returns the spine text extracted from the current record, based on the holding library code, so that you can edit it |
| GetLabelSpineUnformatted |
Returns unformatted text (no line breaks) for a spine label extracted from the current records, based on the holding library code, so that you can edit it |
| GetLabelCallNumber |
Returns the call number from the current record, based on the holding library code, so that you can edit it |
| GetLabelAuthor |
Returns the author text from the current record, so that you can edit it |
| GetLabelTitle |
Returns the title text from the current record, based on the holding library code, so that you can edit it |
| StartLabelBatch |
Starts the label print process (must precede PrintLabel or PrintLabelEx) |
| EndLabelBatch |
Ends the label print process (must follow PrintLabel or PrintLabelEx) |
| PrintMacro |
Prints a macro |
| RunMacro |
Runs a macro |
| AssignMacroToKey |
Assigns a specified keystroke shortcut to a macro |
| LoadProfile |
Loads a specified user profile (for those who use multiple profiles) |
| SendKeys |
Sends keystrokes to the client |
| Bibliographic institution records |
| Command name |
Brief description |
| DeleteAllInstitutionRecords |
Deletes all institution records (IRs) attached to the displayed WorldCat master record. |
| ShowInstitutionRecords |
Shows institution records (IRs) attached to the displayed WorldCat master record. |
| UpdateAndAddInsitutionRecords |
For a displayed WorldCat master record, updates holdings in the master record and then creates and adds an institution record based on the master record.
For a displayed IR workform, updates the master record and then adds the IR. |
| ProduceAndAddInstitutionRecord |
For a displayed WorldCat master record, updates holdings and produces output for the master record, and then creates and adds an IR based on the master record. |
AltProduceAndAddInstitution Record |
For a displayed WorldCat master record, updates holdings for the master record, produces output as described in your OCLC cataloging profile, and then creates and adds an IR based on the master record. |
| ReplaceUpdateAndAddInstitutionRecord |
For a displayed, modified master record, replaces the master record, updates holdings for the master record, and then creates and adds the institution record. |
Note: See more about bibliographic institution records in Cataloging, Bibliographic Institution Records.
Alphabetical list of macro commands
A - F AddField
AddFieldLine
AddToAuthorityFile AddToOnlineDatabase
AltProduceAndAddInsititutionRecord
AltProduceAndUpdateHoldings
ApplyCDFromList
ApplyLocalCDByName
ApplyLocalDefaultCD
ApplyOnlineCDByName ApplyOnlineDefaultCD
AssignMacroToKey
Backspace
Browse
BrowseAuthorityExpanded
CancelChanges
ChangeRecordType
CloseList
CloseRecord
ControlHeadingsAll
Copy
CopyControlNumber
CopyField
CopyRecord
CopySelected
CreateLocalFile
CursorColumn
CursorPosition
CursorRow
Cut
CutSelected
DeleteAllInstitutionRecords
DeleteCurrentField
DeleteCurrentWord
DeleteField
DeleteFieldLine
DeleteHoldings
DeleteKey DeriveNewHPBRecord
DeriveNewRecord
EndCell
EndLabelBatch
EndRecord
Export
ExportAppend
FindReplaceNextText
FindText FixedFieldPosition |
G - O
GetField
GetFieldLine
GetFieldLineUnicode
GetFieldUnicode
GetFirstItem
GetFirstSelectedItem
GetFixedField
GetLabelAuthor
GetLabelCallNumber
GetLabelSpine
GetLabelSpineUnformatted
GetLabelTitle GetListCellData GetListCellDataUnicode
GetListItem
GetNext100Records
GetNextItem
GetNextSelectedItem
GetPrevious100Records
GetPrevItem
GetSelectedText
GetWindowTitle
Holdings
HomeCell
HomeRecord
InsertMode
InsertText
IsHeadingControlled
IsHeldBy
IsOnline
ItemType
KeyDown
KeyLeft
KeyRight
KeyUp
LoadProfile
Lock
Logoff
Logon
MoveFieldDown
MoveFieldUp
MoveRecord
NextSubfield OpenWorkform OpenWorkformForDatabase |
P - Z
Paste
PrevSubfield
Print
PrintLabel
PrintLabelEx
PrintList
PrintMacro
ProduceAndAddInstitutionRecord
ProduceAndUpdateHoldings
QueryRecordStatus
RecallSubmitted
Reformat
ReleaseRecordLock
ReplaceAndUpdateHoldings
Repl
ReplaceRecord
ReplaceText
ReplaceTextAll
ReplaceUpdateAndAddInstitutionRecord
RunMacro
SaveOnline
SaveToLocalFile
Search
SearchList
SendKeys
SetCursorFixedField
SetField
SetFieldLine
SetFixedField
SetMyStatus
SetSelectedText
SetTopWindow
SetWorkflowStatus
ShowInstitutionRecords
StartLabelBatch
SubmitForReview
UncontrolAll
UncontrolHeading
UpdateAndAddInstitutionRecord
UpdateHoldings
Validate
WindowCount |
back to top
Connexion client macro commands: Log on and off
Logon
| Syntax |
BOOL = CS.Logon (sAuthorization, sPassword, sLevel) |
| Use to |
Log on to OCLC Connexion.
Same as using the File > Log On menu command, except that the Message of the Day is not displayed after logon is completed. |
| Parameters |
|
| Return values |
TRUE if logon is successful, or FALSE if not. |
| Example |
Sub Main()
Dim CS As Object
Set CS = CreateObject("Connex.Client")
If CS.Logon("", "", "") = True Then
MsgBox "Logon successful"
End If
End Sub |
| What this example does |
- Logs on using the default authorization and password you selected in Tools > Options > Authorizations tab
- If logon is successful, returns the message Logon successful.
|
Logoff
| Syntax |
CS.Logoff |
| Use to |
Log off OCLC Connexion.
Same as using the File > Log Off menu command. |
| Parameters |
None |
| Return values |
No value |
| Example |
Sub Main()
Dim CS As Object
Set CS = CreateObject("Connex.Client")
CS.Logoff
End Sub |
| What this example does |
- Logs off from the system (ends your session).
|
IsOnline
| Syntax |
BOOL = CS.IsOnline |
| Use to |
Determine whether you are logged on. |
| Parameters |
None |
| Return values |
TRUE if logged on; otherwise, FALSE. |
| Example |
Sub Main()
Dim CS As Object
Set CS = CreateObject("Connex.Client")
If CS.IsOnline = True Then
MsgBox "You are currently logged on"
Else
MsgBox "You are not currently logged on"
End If
End Sub |
| What this example does |
- If logged on, returns the message You are currently logged on
Or If not logged on, returns the message You are not currently logged on. |
back to top
Connexion client macro commands: Search
Search
| Syntax |
nNumRecords = CS.Search (sDatabase, sSearchTerm) |
| Use to |
Search an online database using a search string.
Same as using the following menu commands:
- Cataloging > Search > WorldCat
- Cataloging > Search > Online Save File
- Cataloging > Search > Online Constant Data
- Cataloging > Search > Local Save File
- Cataloging > Search > Local Constant Data
- Authorities > Search > Authority File
- Authorities > Search > Online Save File
- Authorities > Search > Online Constant Data
- Authorities > Search > Local Save File
- Authorities > Search > Local Constant Data
|
| Parameters |
- nNumRecords represents the return value: the number of records found.
- For sDatabase, enter one of the following database identifiers, enclosed in quotation marks ("):
- WC (WorldCat)
- BS (online bibliographic save file)
- BD (online bibliographic constant data)
- BL (local bibliographic save file)
- BC (local bibliographic constant data)
- BR (online bibliographic review records)
- AF (Authority File)
- AS (online authority save file)
- AD (online authority constant data)
- AL (local authority save file)
- AC (local authority constant data)
- AR (online authority review records)
- CN (Chinese name authority file)
- HP (online Hand Press Book database)
- HO (online Hand Press Book save file)
- HL (local Hand Press Book save file)
Note: If the database parameter is empty or the database identifier is not supported, the search defaults to WorldCat.
- For sSearchTerm enter a search string (in upper- or lowercase) that is valid for the database you want to search. Enclose in quotation marks (").
Note: Whole phrase WorldCat searches require that the phrase be enclosed in quotation marks. For these searches, enclose the phrase in a double set of quotation marks (""search phrase"").
Tip: Retrieve all records from save file or constant data: To retrieve all records from an online save file or from online constant data, specify the database identifier and leave the search string empty. Example: CS.Search "BS", "" (retrieves all records in the online bibliographic save file) |
| Return values |
Number of records found (nNumRecords). |
| Example |
Sub Main()
Dim CS As Object
Set CS = CreateObject("Connex.Client")
If CS.IsOnline = False Then
End If
CS.Search "WC", "#1" nNumRecords = CS.Search("WC", "gon,wi,th,w") MsgBox (nNumRecords) & " records were found for Gone with the Wind"
End Sub |
| What this example does |
- Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
- Searches WorldCat for record 1.
- Searches WorldCat's derived-search title index for Gone with the Wind, and returns the number of records retrieved (X) in the message [X] number of records were found for Gone with the Wind.
|
Search guidelines, indexes, examples
WorldCat searches (database identifier WC)
The search string for the Search macro command should follow the same format for a keyword/numeric or derived search that you would enter in the Command Line Search of the Search WorldCat window, except:
Caution: Do not use the Search macro command to browse WorldCat. You must use the macro command Browse.
Guidelines:
- Omit the Find command (fin) from a derived or keyword search.
- Include index labels in a keyword search.
- When you use index labels, include the following punctuation:
- Colon (:) for single words
- Equal sign (=) for phrases and whole phrases
- Enclose whole phrases in a double set of quotation marks ("" "")
- Do not use spaces before or after the punctuation
- Index labels are optional for a derived search if it is the first or only search; if you combine searches, index labels are required.
- Enter an OCLC Control Number search with the index label (no:) or precede the number with an asterisk (*) or number sign (#).
- If you include qualifiers, begin each qualifier with a slash or an index label followed by a colon (:).
Use slashes or index labels with the following four types of qualifiers: type of material, years, microform, or source (/dlc).
Use index labels only to qualify a search by Internet/non-Internet or a language.
- For slash qualifiers, you can include only one qualifier of each type and the qualifiers must be in the last position of the search statement.
- Combine searches using Boolean operators (and, or, not).
- In a keyword search, you can specify proximity and order of terms with proximity operators with (w) or near (n).
- To expand a term in a keyword or numeric search, replace characters or endings with symbols for wildcards (# or ?), truncation (*), and plural stemming (+). See Use wildcards, truncation, and plural stemming in searches for details.
Caution: Wildcard and truncation symbols must be preceded by at least three characters.
For more information and for lists of selected indexes and examples, see Cataloging, Search WorldCat, "Search WorldCat interactively."
See Searching WorldCat Indexes at < http://www.oclc.org/support/documentation/worldcat/searching/searchworldcatindexes > for comprehensive descriptions of indexes, guidelines, and examples.
Online bibliographic save file searches (database identifier BS)
Guidelines:
- Enter an index label (see list below), a colon, and then the search term.
- You can combine searches using Boolean operators. To distinguish the words and, or, or not when they are part of your search term (not used as Boolean operators), you must enclose in single quotation marks (').
Example: "ti:red 'and' the black"
- The search is not case-sensitive: you can enter the search string in upper- or lowercase.
- To retrieve all records in the save file, leave the search string parameter empty: CS.Search "BS", "".
Indexes and labels:
| Index |
Label |
Values |
| Save File Number |
sf: (default) |
You supply |
| OCLC Control Number |
an: |
You supply |
| Title |
ti: |
You supply |
| URL |
am: |
You supply |
| Used Date |
us: |
You supply |
| My Status |
ms: |
You supply |
| Action Status |
as: |
delete holdings completed delete holdings failed export completed export failed export ready label completed label failed label ready produce completed produce failed replace completed replace failed update holdings completed update holdings failed validate completed validate failed |
| Workflow Status |
ws: |
completedin processin reviewnew |
| Source Status |
ss: |
derivedextractedimportedoclcpathfinderworkform |
| Review |
rs: |
submitted |
Note: If you record rather than write a macro, statuses are recorded with no spaces between words. When you write macros, you can retain the spaces. Values you enter are not case-sensitive.
Online bibliographic constant data searches (database identifier BD)
Search examples:
CS.Search "BD", "nm:bibconstantdata" (retrieves a constant data record named bibconstantdata)
CS.Search "BD", "" (retrieves all bibliographic constant data records)
Indexes and labels:
- Constant Data Name (nm) (default)
- My Status (ms)
Local bibliographic save file searches (database identifier BL)
Follow the same guidelines as for online bibliographic save file searches (except use the database identifier BL).
Indexes and labels:
| Index |
Label |
Values |
| Save File Number |
sf: (default) |
You supply |
| OCLC Control Number |
an: |
You supply |
| Title |
ti: |
You supply |
| Name |
nm: |
You supply |
| Date |
dt: |
You supply |
| Standard Number |
sn: |
You supply |
| Holding Library Code |
cd: |
You supply |
| My Status |
ms: |
You supply |
| Workflow Status |
ws: |
completedin processin reviewnew |
| Action Status |
as: |
delete holdings completed delete holdings failed delete holdings ready delete holdings notset export completed export failed export ready export notset label completed label failed label ready label notset produce completed produce failed produce ready produce notset replace completed replace failed replace ready replace notset update holdings completed update holdings failed update holdings ready update holdings notset validate completed validate failed validate notset |
| Source Status |
ss: |
derivedextractedimportedoclcpathfinderworkform |
| Format |
ft: |
bookscomputer filesmapsmixed materialsscoresserialssound recordingsvisual materials |
| Held Status |
hl: |
true false |
| Library |
lb: |
dlc pcc nlm gpo agl ukm nlc |
| Retrieval order |
ro: |
save file number oclc control number date/time added name title |
Note: If you record rather than write a macro, statuses are recorded with no spaces between words. When you write macros, you can retain the spaces. Values you enter are not case-sensitive.
Local bibliographic constant data searches (database identifier BC)
See examples for online bibliographic constant data searches (except use the database idenfifier BC).
Indexes and labels:
- Constant data name (nm:) (default)
- My Status (ms:)
Online bibliographic review records (database identifier BR)
Use to find bibliographic records sent to your library for review by another library you specify by institution symbol. (Same as selecting Review File Records for Institution check box and entering institution symbol in the Search Online Bibliographic Save File window via Cataloging > Search > Online Save File).
Index and label:
Records sent for review (sm)
Enter a valid institution symbol (in uppercase) for a library whose records you want to retrieve for review.
Example:
num = CS.Search("BR", "sm:OCL")
MsgBox("Found " & num & "records")
Authority File searches (database identifier AF)
Guidelines:
- Enter an index label (see list below), a colon, and then the search term.
Example: CS.Search "AF", "pn:mitchell"
- You can combine searches using Boolean operators. To distinguish the words and, or, or not when they are part of your search term, you must enclose them in single quotation marks (').
Example: CS.Search "AF", "ti:war 'and' peace"
- The search is not case-sensitive: you can enter the search string in upper- or lowercase.
Indexes and labels:
| Index |
Label |
| Personal Names |
pn: (default) |
| Corporate Names |
co: |
| Conference Names |
cn: |
| Titles |
ti: |
| Topicals |
to: |
| Geographic Names |
gg: |
| Children's Subjects |
sj: |
| LCCN |
ln: |
| ISBN |
bn: |
| ISSN |
in: |
| LCSH |
su: |
| OCLC ARN |
an: |
| Subdivision Headings |
sb: |
| LC Name |
nw: |
| Derived Personal Name |
pd: |
| Derived Corporate/Conference/Geographic |
cd: |
| Derived Title |
td: |
| Derived Topical Subject |
sd: |
Online authority save file searches (database identifier AS)
Guidelines:
- Enter an index label (see list below), a colon, and then the search term.
- You can combine searches using Boolean operators. To distinguish the words and, or,or not when they are part of your search term (not used as Boolean operators), you must enclose in single quotation marks.
Example: CS.Search "AS", "ti:red 'and' the black"
- The search is not case-sensitive: you can enter the search string in upper- or lowercase.
- To retrieve all records in the save file, leave the search string parameter empty: CS.Search "AS", "".
Indexes and labels:
| Index |
Label |
Values |
| Save File Number |
sf: (default) |
You supply |
| Personal Names |
pn: |
You supply |
| Corporate Names |
co: |
You supply |
| Conference Names |
cn: |
You supply |
| Titles |
ti: |
You supply |
| Topicals |
to: |
You supply |
| Geographic Names |
gg: |
You supply |
| Children's Subjects |
sj: |
You supply |
| LCCN |
ln: |
You supply |
| LCSH |
su: |
You supply |
| OCLC ARN |
an: |
You supply |
| Subdivision Headings |
sb: |
You supply |
| Replace Date |
rp: |
You supply |
| Workflow Status |
ws: |
completein processin reviewnewrespondedimported |
| Review Status |
rs: |
submitted |
Note: If you record rather than write a macro, statuses are recorded with no spaces between words. When you write macros, you can retain the spaces. Values you enter are not case-sensitive.
Online authority constant data searches (database identifier AD)
Search examples:
CS.Search "AD", "nm:authconstantdata" (retrieves a constant data record named authconstantdata)
CS.Search "AD", "" (retrieves all authority constant data records)
Index and label:
Constant Data Name (nm) (default)
Local authority save file (database identifier AL)
Follow the same guidelines as for online authority save file searches (except use the database identifier AL).
| Index |
Label |
Values |
| Save File Number |
sf: (default) |
You supply |
| OCLC ARN |
an: |
You supply |
| Heading |
he: |
You supply |
| Workflow Status |
ws: |
completein processin reviewnew |
| My Status |
ms: |
You supply |
| MARC Organization Code |
cd: |
You supply |
| Master Record Locked |
lk: |
true false |
| Action status |
as: |
add completed add failed add ready add notset replace completed replace failed replace ready replace notset submit completed submit failed submit ready submit notset export completed export failed export ready export notset |
| Retrieval Order |
ro: |
save file number oclc arn date/time added heading |
Note: If you record rather than write a macro, statuses are recorded with no spaces between words. When you write macros, you can retain the spaces. Values you enter are not case-sensitive.
Local authority constant data searches (database identifier AC)
See examples of online authority constant data searches (except use the database identifier AC).
Indexes and labels:
- Constant data (nm:) (default)
- My Status (ms:)
Online authority review records (database identifier AR)
Use to find authority records sent to your library for review by another library you specify by institution symbol. (Same as selecting Review File Records for Institution check box and entering institution symbol in the Search Online Authority Save File window via Authorities > Search > Online Save File).
Index and label:
Chinese name authority file searches (database indicator CN)
Search for Chinese name authority records using Latin script search terms only. You cannot use non-Latin scripts with macros. Access to the records is read-only.
Indexes and labels:
| Index |
Label |
| ARN |
an: (default) |
| LCCN |
ln: |
| Personal Name |
pn: |
| Corporate/Conference Name |
cn: |
| Title |
ti: |
Hand Press Book database searches (database indicator HP)
Hand Press Book (HPB) is available by contract with OCLC to members of the Consortium of European Research Libraries (CERL).
For indexes and labels, in the client, open the client Help, click the Index tab, enter keyword Hand Press Book and double-click search indexes for the HPB database to see a list of Hand Press Book-specific indexes and a list of standard WorldCat indexes that can also be used for Hand Press Book searches.
Online Hand Press Book save file searches (database indicator HO)
Hand Press Book is available by contract with OCLC to members of the Consortium of European Research Libraries (CERL).
Indexes and labels:
| Index |
Label |
Values |
| Save File Number |
sf: (default) |
You supply |
| OCLC Control Number |
an: |
You supply |
| Title |
ti: |
You supply |
| Name |
pn: |
You supply |
| My Status |
ms: |
You supply |
| Action status |
as: |
add completed add failed add ready delete holdings completed delete holdings failed export completed export failed export ready label completed label failed label ready produce completed produce failed replace completed replacefailed update holdings completed update holdings failed validate completed validate failed |
| Workflow status |
ws: |
completein processin reviewnew |
| Source status |
ss: |
derived extracted imported oclc pathfinder workform |
| Review status |
rs: |
submitted |
Note: If you record rather than write a macro, statuses are recorded with no spaces between words. When you write macros, you can retain the spaces. Values you enter are not case-sensitive.
Local Hand Press Book save file searches (database indicator HL)
Hand Press Book is available by contract with OCLC to members of the Consortium of European Research Libraries (CERL).
Indexes and labels:
| Index |
Label |
Values |
| Save File Number |
sf: (default) |
You supply |
| OCLC Control Number |
an: |
You supply |
| Title |
ti: |
You supply |
| My Status |
ms: |
You supply |
| Action Status |
as: |
add to HPB completed add to HPB failed add to HPB ready add to HPB not set export completed export failed export ready export notset label completed label failed label ready label notset replace completed replace failed replace ready replace notset validate completed validate failed |
| Workflow Status |
ws: |
completedin processin reviewnew |
| Source Status |
ss: |
derivedoclcworkform |
Note: If you record rather than write a macro, statuses are recorded with no spaces between words. When you write macros, you can retain the spaces. Values you enter are not case-sensitive.
Browse
| Syntax |
BOOL = CS.Browse (sDatabase, sIndex, sSearchTerm) |
| Use to |
Browse WorldCat or Authority File.
Same as using the following menu commands: Cataloging > Browse> WorldCat Authorities > Browse > Authority File |
| Parameters |
- For sDatabase, enter one of the following database identifiers, enclosed in quotation marks ("):
- WC (WorldCat)
- AF (Authority File)
- HP (online Hand Press Book database)
Notes:
- If the database parameter is empty or the database identifier is not supported, the browse defaults to WorldCat.
- If the index parameter is empty or the index label is not supported, the browse defaults to the browse title index for WorldCat or the personal names index for the Authority File.
- For sIndex enter a valid index for the online database you want to browse, enclosed in quotation marks.
Note: See notes on browsing WorldCat indexes below. See the list of indexes below for browsing the Authority File.
- For sBrowseTerm enter a browse string (in upper- or lowercase), enclosed in quotation marks.
|
| Comments |
You must be logged on to run this macro. |
| Return values |
TRUE if the browse is successful, or FALSE if not. |
| Example |
Sub Main()
Dim CS As Object
Set CS = CreateObject("Connex.Client")
If CS.IsOnline = False Then
End If
If CS.Browse("WC", "ti", "gone with the wind") = True Then
MsgBox "Browse successful"
Else
MsgBox "Browse not successful"
End If
End Sub |
| What this example does |
- Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
- Browses the WorldCat title for Gone with the Wind.
- Returns a message confirming that the browse was successful or unsuccessful.
|
Browsing WorldCat
For indexes, labels, and examples, see "Selected browsable indexes" in Cataloging, Search WorldCat, "Browse WorldCat."
See Searching WorldCat Indexes at < http://www.oclc.org/support/documentation/worldcat/s |