Problem solve Get help with specific problems with your technologies, process and projects.

Dump name from ID file

Display most current Notes canonical name.

Like many shops, we have a network directory with thousands of Notes ID files. Which variation of JSMITH.ID belongs to Jane Smith, who lost her id file or forgot her password. We are now naming by network account, but have many using default conventions. This agent reads through a directory of ID files and writes a file displaying the file name and the most current Notes canonical name (accounts for name changes in an id file).

' Name: dump Notes ID file
' Purpose: prints name of id file and most current name stored in ID.
'   prints NO NAME FOUND if no canonical name is found in the ID
' 09/26/01 - created. EAJ

Option Public
Option Declare

Sub Initialize
Dim f As Integer, g As Integer, i As Integer, j As Integer
Dim IDpath As String, IDfile As String, InLine As String, OutName As String
On Error Goto processError	' read past end of file
g% = Freefile
Open "c:\idout.txt" For Output As #g%
IDpath = "h:\Notes\R5\data\ids\people\"
IDfile = Dir$(IDpath+"*.id")
Do While IDfile <> ""
	f% = Freefile
	Open IDpath+IDfile For Input As #f%
	InLine = ""
	OutName = "NO NAME FOUND"
	Do Until Eof (f%)
		InLine = InLine + Input$ (256, #f%)
		i = Instr (InLine, "CN=")
		If i > 1 Then
			InLine = Mid$ (InLine, i) + Input$ (32, #f%)
			j = Instr (InLine, "O=CHP")
			If j > 0 Then
				OutName = Left$ (InLine, j+5)
				Inline = Mid$ (InLine, j+6)
				InLine = Mid$ (Inline, 3)
			End If
			InLine = Right$ (InLine, 2)
		End If
	IDfile = Dir$()
Close g%
Exit Sub
Close f%
Print #g%,IDfile,OutName
Resume nextfile
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




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