Skip to main content
OCLC Support

ReplaceAndUpdateHoldings

Find the syntax, use, parameters, return values, and an example for the ReplaceAndUpdateHoldings macro command in Connexion client.
Syntax BOOL = CS.ReplaceAndUpdateHoldings
Use to Replace a WorldCat bibliographic record, or records selected in a list, with the current record and update holdings (adds your OCLC institution symbol to the records).
Or
When offline, marks local record(s) for batch update and replace.

Same as using the Action > Replace and Update Holdings menu command.
Parameters None
Comments
  • You must be logged on.
  • You cannot use this macro command to mark local file records for batch processing. This command involves two actions. Batch processing can complete only one action per record.
Return values TRUE if the action is successful, or FALSE if not.
Example Sub Main()

     Dim CS As Object
     Dim bResult As Integer

     Set CS = GetObject(,“Connex.Client”)

     If CS.IsOnline = False Then
          CS.Logon ““, ““, ““
     End If

     CS.Search “WC”, “#1”

     If CS.Lock = True Then

     CS.AddFieldLine 1, “500 Field added at line position 1”

     bResult = CS.ReplaceAndUpdateHoldings

     If bResult = True Then
          MsgBox “The command completed successfully”
     Else
          MsgBox “The command did not complete successfully”
     End If
     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.
  • Searches WorldCat for record number 1.
  • Locks the original copy of record number 1.
  • Adds a new field 500 as the first line of the record, with no indicators (two blank spaces), and the text: Field added at line position 1.
  • Replaces the original copy of the record (WorldCat record now contains the new field), and updates holdings (adds your OCLC institution symbol to the record).
  • If the action is successful, returns the message: The command completed successfully. If not, returns the message: The command did not complete successfully.