Migrating Domino Server Windows NT to AS400

Since we migrated on AS400 server, an agent “notes” which was connected by ODBC to AS400 does not function any more. Is it possible to create ODBC on AS400 so that the agent (located on AS400) would connect on AS400 (on itself) ?

Sorry for my poor english :wink:

Subject: Migrating Domino Server Windows NT to AS400

Yes, you need to use WRKRDBDIRE on the iSeries to find the name of your database, then use that as the ODBC DSN in your calls.

Subject: RE: Migrating Domino Server Windows NT to AS400

Thanks for your answer. I use now dsn odbc i find with WRKRDBDIRE.

the agent notes is connected well on the database, but there is an error in the query.

In the log of domino server, we find :

"10/12/2006 14:40:02 Agent printing: Connexion ODBC effectuée

10/12/2006 14:40:02 Agent printing: 1 . Nombre de valeurs inconnues: True LastUPRID = 0"

Perharps query don’t find file TRFCL on the AS400. Thanks for your help

code of agent

’ Connection à l’AS400 par ODBC

status = con.ConnectTo ( val_parametre("NomODBC"),val_parametre("NomUser400"),val_parametre("MdpUser400")) 

If status = False Then 

	Print "Connexion ODBC non effectuee"

	Print qry.GetExtendedErrorMessage + qry.GetErrorMessage

	Call journal.LogError(con.GetError,con.GetErrorMessage)

	Exit Sub

Else   

	Print "Connexion ODBC effectuee"

End If



moredata = True

lastUCLID = 0

While moredata     

	thequery = "Select UCLCL,UCLFC,UCLLF,UCLGD,UCLST,UCLCO,UCLAG,UCLNA,UCLNO,UCLCI,UCLCD,UCLNV,UCLVI,UCLCP,UCLBD,UCLIN,UCLTH,UCLTC,UCLDC,UCLDM,UCLID,UCLTA from TRFCL"

	qry.SQL = thequery + " WHERE UCLID > " + Cstr(lastUCLID) + " ORDER BY UCLID"

	Set result = New odbcresultset

	Set result.query = qry

	result.execute

	If qry.GetError <> DBstsSUCCESS Then 

		result.close(DB_CLOSE)

		Print qry.GetExtendedErrorMessage + qry.GetErrorMessage

		Call journal.LogError(qry.GetError,qry.GetErrorMessage)

		Exit Sub

	End If

	nbloop = nbloop + 1

	If result.numrows = DB_ROWSUNKNOWN Then 

		Print  nbloop ". Nombre de valeurs inconnues: " result.numrows = DB_ROWSUNKNOWN "     LastUCLID = "  Cstr(LastUCLID)

		If result.numrows = DB_ROWSUNKNOWN Then numligneconnu = "oui" Else numligneconnu = "non"

		Call journal.LogAction(nbloop & ". Nombre de valeurs inconnues: " & numligneconnu & "     LastUCLID = "  & Cstr(LastUCLID))

	Else

		Print  nbloop ". Nombre de valeurs : " result.numrows "     LastUCLID = "  Cstr(LastUCLID)

		Call journal.LogAction(nbloop & ". Nombre de valeurs : " & result.numrows & "     LastUCLID = "  & Cstr(LastUCLID))

	End If

	numrows = result.numrows