Hello -
I have a LotusScript agent which uses LSDO ODBC to call an RPG program. The RPG program returns a result set to the LotusScript agent. This was working successfully on a iSeries Domino server, running OS/400 V5R2 and Domino 6.5.3.
I have now moved the application to a new iSeries Domino server, running OS/400 V5R3 and Domino 6.5.3 with Fixpack 1. Now, when I execute the LotusScript agent, IsResultSetAvailable returns false. Our RPG programmer tells me the RPG program is being executed successfully, and should be returning the result set to Domino.
Interestingly, I have another LotusScript agent on the new server which uses LSDO ODBC to execute an SQL query to retrieve a result set from a DB2 database on the iSeries. This agent is working successfully. So… it appears I am having a problem retrieving a result set from a call to an RPG program, but retrieving a result set from an SQL query works successfully.
Someone on this forum posted a similar issue, and said that applying PTF SI15099 to 5722-SS1 fixed their problem. We have already applied this PTF, but it didn’t help.
The agent code appears below. Please let me know if you have any ideas on how to resolve this problem. Thanks !!!
Function RetrievePINNumber(con As ODBCConnection,doc As NotesDocument) As Variant
'Call the RPG program to retrieve the next PIN Number
On Error Goto ErrHandler
Set query = New ODBCQuery
Set res = New ODBCResultSet
Set query.Connection = con
query.SQL="CALL FACTS.KBAGRPCL('&A')"
Set res.Query = query
If Not res.Execute Then
RetrievePINNumber=False
Exit Function
End If
If res.IsResultSetAvailable Then
res.FirstRow
numberout=res.GetValue(1)
Else
RetrievePINNumber=False
Call WriteToAgentLog("RetrievePINNumber","Result set not available")
Exit Function
End If
RetrievePINNumber=True
Exit Function
ErrHandler:
If Err <> 0 Then
ErrorMsg = ErrorMsg + "Line Number " & Str(Erl) & ", Error " & Str(Err) & "- " & Error$ + NewLine
Call WriteToErrorLog(Err,"RetrievePINNumber","LineNumber " & Str(Erl) & ", Error " & Str(Err) & "- " & Error$ )
End If
Err=0
Resume Next
End Function