Manage Learn to apply best practices and optimize your operations.

Tracking Down Orphans

This agent makes it easy to find orphan documents. It runs through all documents in the database and tests each response doc it finds to make sure its parent can be located. If an orphan is found the document is placed in a folder called Orphan for easy retrieval.

Sub Initialize
Dim Session As New NotesSession
Dim CurDB As NotesDatabase
Dim DocColl As NotesDocumentCollection
Dim Doc As NotesDocument
Dim Parent As NotesDocument

Set CurDB = Session.CurrentDatabase
Set DocColl = CurDB.AllDocuments
Set Doc = DocColl.GetFirstDocument
While Not(Doc Is Nothing)
If Doc.IsResponse Then
On Error Goto Orphan
Set Parent = CurDB.GetDocumentByUNID(Doc.ParentDocumentUNID)
End If
Set Doc = DocColl.GetNextDocument(Doc)

Resume Next
End Sub

Dig Deeper on Domino Resources - Part 5



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...