Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to export Cognos LDAP 1

Status
Not open for further replies.

infocom

IS-IT--Management
Oct 10, 2002
8
0
0
FR
Hello,

I need a help in configuring a macro or any else program to export Ldap Directory into a Database.
The purpose is to build report counting users, user_class, and other combinations (users group by user_class, by directory...)

Any one have idea or a solution ?

Is a cognos'macro the best way ?

Thanks
 
this will be a step in the right direction


*====================================================================================================================
' * ClassUserList.mac
' *
' * This macro gets the userclass list and, for each userclass, the users list.
' * All are written into a text file.
' *
' *====================================================================================================================

Option Explicit

Sub Get_Users_List(UserClass As Object)

Dim I As Integer

If UserClass.Users.Count > 0 Then
For I = 1 To UserClass.Users.Count
Print #1, UserClass.Name & ":" & UserClass.Users(I).Name
Next
else
Print #1, UserClass.Name & ":"
End If

If UserClass.UserClasses.Count >= 0 Then
For I = 1 To UserClass.UserClasses.Count
Call Get_Users_List(UserClass.UserClasses(I))
Next
End If

End Sub

Sub Main()

Dim objAuthApp As Object ' Access Manager Application Object
Dim objAuthDoc As Object ' Access Manager Document Object
Dim objDSConfig As Object

Const AdminUser = "Administrator"
Const AdminSignon = ""
Const NameSpace = "default"
Const FileName = "C:\ClassUsers.Txt"

' Calls Access Manager and opens namespace with admin signon
Set objAuthApp = CreateObject("Authenticator2.Application")
Set objAuthDoc = objAuthApp.Documents.OpenWithBasicSignon(NameSpace, AdminUser, AdminSignon, 0)

' Opens output file and writes title
Open FileName For Output As #1
Print #1, "User Class:User Name"

' Calls recursive procedure for getting users list
Call Get_Users_List(objAuthDoc.RootUserClass)

' Closes output file
Close #1

' Exits Access Manager
objAuthApp.Quit
Set objAuthDoc = Nothing
Set objAuthApp = Nothing

End Sub


Good luck,

Martijn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top