Making a 949 Macro for OCLC Passport


To add the macro to your OCLC workstation, you will need either to type the macro directly or to record the macro.


Type the macro directly

  1. Open OCLC Passport
  2. Select Tools
  3. Select Macro. A "Macro" window will open.
  4. Click in the blank window under "Macro Names, and type a name for your new macro (e.g. "949Add"). Your macro name may not contain any spaces ("949 Add" is invalid).
  5. Click "Create." Click the "Create" button that lies to the right of the list of Macro Names. There is another "Create" button to the right of the list of Macro Books: leave that one alone. A Macro Description window will open.
  6. Type a short description of what you want the macro to do (e.g. "Adds 949 to bib record for export.")
  7. Click "OK." The Macro Editor and Debugger will open. It already contains beginning lines and ending lines for your macro code.
  8. Between "sub main" and "end sub", add the following four lines (You can type them directly, or copy-and-paste them from your browser window.)

    (After selecting the text, press ctrl-c to copy the text to your clipboard.)

  9. Exit the macro window by clicking on the boxed "x" in the upper right corner. A dialog box will appear, asking you if you want to save changes.
  10. Click "Yes."

Record the macro

  1. Open OCLC Passport
  2. Open a session (i.e. go online)
  3. Select Tools
  4. Select Macro. A "Macro" window will open.
  5. Click in the blank window under "Macro Names, and type a name for your new macro (e.g. "949Add")
  6. Click "Record." A Macro Record dialog box will open.
  7. Click No.A Macro Description window will open.
  8. Type a short description of what you want the macro to do (e.g. "Adds 949 to bib record for export.")
  9. Click "OK."
  10. You will go back to the main window of your OCLC session, but you will see two new buttons in the upper left of your screen: a little red box and a blue circle with two vertical bars. These are the "Stop" and "Pause" controls for your macro recorder.
  11. Press the "Home" key on your keyboard. (On my keyboard, it's just to the right of the "Backspace" key, between "Insert" and "Home." Your keyboard may vary.)
  12. Type the following:
    [Ctrl-|]99 (two spaces) 949 (five spaces) *recs=b;ov=.b
    Do not press F11.
  13. Click the "Stop" icon (the little red box at the upper left).

Using the macro

  1. Select Tools.
  2. Select Macro.
  3. From the list under "Macro names:" select "949Add"
  4. Select Run.

[If you have added your macro to the toolbar, just click on the proper number.]

The macro moves the cursor to the home position, then automatically types a 949 field up to "ov=.b"

"ov=" is the first half of an overlay command. By leaving off at "ov=.b," the macro prompts you to tell it what record you would like to overlay.

To overlay a record, complete the overlay command by typing the record number of the LANCE record you wish to overlay, then ending in a semicolon, thus: "ov=.b12345678; [F11]"

If you do not wish to overlay, but nevertheless wish to use the macro, you may do so without deleting the "ov=.b"; LANCE may interpret the partial command as an invalid bib number, and consequently warn you that the overlay failed. But in this case you didn't want to overlay anything anyway, right?


Add the macro to your toolbar

  1. Select Tools.
  2. Select Customize.
  3. Choose the "Toolbar" tab.
  4. For an available "User Tool," select your Macro from the dropdown menu.
  5. Click "OK"

Create a macro to export, unedit, and update

The instructions given above for creating a 949 macro are basic instructions that can be followed when creating almost any macro. The only difference is the code that must be written into the Macro Editor. The instructions below describe how to create a macro to export a bibliographic record, unedit the OCLC record, and add you symbol to the OCLC record (i.e., update). Because so much of the procedure is identical to the already-described procedure, I have omitted the illustrations.

  1. Open OCLC Passport
  2. Select Tools
  3. Select Macro. A "Macro" window will open.
  4. Click in the blank window under "Macro Names, and type a name for your new macro (e.g. "Export_Update"). Your macro name may not contain any spaces.
  5. Click "Create." A Macro Description window will open.
  6. Type a short description of what you want the macro to do (e.g. "Exports and unedits a record, then updates.")
  7. Click "OK." The Macro Editor and Debugger will open. It already contains beginning lines and ending lines for your macro code.
  8. Between "sub main" and "end sub", add the following lines (You can type them directly, or copy-and-paste them from your browser window.)

    (After selecting the text, press ctrl-c to copy the text to your clipboard.)

    If you would like to customize this macro, note its various components. The following three lines do system-related stuff and set the cursor to home position. Don't delete or omit them:

    The following three lines export the record. If you do not want the macro to export the bib record, then delete or omit them: The following three lines unedit the record. If you do not want the macro to unedit the bib record, then delete or omit them: The following three lines update the record. If you do not want the macro to update the bib record, then delete or omit them:
  9. Exit the macro window by clicking on the boxed "x" in the upper right corner. A dialog box will appear, asking you if you want to save changes.
  10. Click "Yes."
  11. You can add this macro to your toolbar (e.g. as "2"), then with a click of your mouse you can export, unedit, and update the record.