Verify Group Members In Nab

Have you ever looked at the list of names in a group in your addressbook and
thought, "he retired last year"? This script verifies the membership in groups
in the name and addressbook. It generates a simple report showing exceptions.
Put this script in an agent and schedule it or run it manually on command. If
it is scheduled, the report will be saved on the server.

Current limitations:
- Server names and wildcards are reported as exceptions.
- Agent must reside in the NAB.
Sub Initialize

Dim Session As New NotesSession
Dim DB As NotesDatabase
Dim Group As NotesDocument
Dim Person As NotesDocument
Dim ReadPG As NotesDocument
Dim GView As NotesView
Dim PGView As NotesView

Dim fileNum As Integer
FileNum% = Freefile()
Print "Logging output messages to \APPS\NOTES\GROUP.LOG"
Open "group.log" For Output As fileNum%
Print #FileNum%, "Audit Group Agent ", Now ' print a header line to log file
Print "Audit Group Agent ", Now ' print to log db (or to status line if run

Set DB = Session.CurrentDatabase
Set GView = DB.GetView ( "($VIMGroups)" )
Set PGView = DB.GetView ( "($VIMPeopleandGroups)" )

Set Group = GView.GetFirstDocument

Do Until Group Is Nothing
Print #FileNum%, Chr(10) & "Group: " & Group.ListName(0) & " " &
Group.ListDescription(0) & " - - - - - -"

Forall i In Group.Members
Set PersonName = New NotesName( i )
Set ReadPG = PGView.GetDocumentByKey( PersonName.Abbreviated )
If ReadPG Is Nothing Then
Print #FileNum%, " Entry does NOT exist - - " & PersonName.Abbreviated
Print #FileNum%, " " & PersonName.Abbreviated
End If
End Forall ' all members

Set Group = GView.GetNextDocument ( Group )
Loop ' all groups


End Sub
This was first published in November 2000

Dig Deeper on Domino Resources - Part 6



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:




  • 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 ...