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)
			Else
				InLine = Mid$ (Inline, 3)
			End If
		Else
			InLine = Right$ (InLine, 2)
		End If
	Loop
NextFile:
	IDfile = Dir$()
Loop
Close g%
Exit Sub
processError:
Close f%
Print #g%,IDfile,OutName
Resume nextfile
End Sub
This was first published in November 2001

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close