go to post Brendan Batchelder · Jun 8, 2016 I just wanted to add another example to this. This example shows how to call an oracle stored procedure that uses a SYS_REFCURSOR as an output parameter. CREATE OR REPLACE PROCEDURE "QUALITY"."BRENDANGETCURSORS" ( "ONE" IN DECIMAL, "TWO" OUT SYS_REFCURSOR) IS BEGIN OPEN TWO FOR SELECT * FROM QUALITY.BRENDAN WHERE NUM=ONE; END "BRENDANGETCURSORS"; And the table Quality.Brendan just has a DECIMAL column named NUM and a VARCHAR2 column named STRING Here is the code I used in my Ensemble SQL operation: Method OnMessage(pRequest As Ens.Request, Output pResponse As Ens.Response) As %Status { set tSC = $$$OK set parms=2 set parms(1,"IOType")=$$$SQLPARAMINPUT set parms(1,"SqlType")=$$$SqlDecimal set parms(1,"Prec")=2 set parms(1)=1 set parms(2,"IOType")=$$$SQLPARAMOUTPUT set parms(2,"SqlType")=$$$SqlWLongVarchar set parms(2,"LOB")=0 set sql="{CALL QUALITY.BRENDANGETCURSORS(?,?)}" set rs = ##class(%ListOfObjects).%New() set snap = ##class(EnsLib.SQL.Snapshot).%New() set snap.MaxRowsToGet=10 set tSC = rs.Insert(snap) quit:$$$ISERR(tSC) tSC set tSC=..Adapter.ExecuteProcedureParmArray(.rs,.out,sql,"io",.parms) quit:$$$ISERR(tSC) tSC set snap = rs.GetAt(1) $$$TRACE("Row Count: "_snap.RowCount) $$$TRACE("Column Count: "_snap.ColCount) $$$TRACE("Object? "_$IsObject(snap)) while ('snap.AtEnd) { $$$TRACE("Num: "_snap.Get("Num")) $$$TRACE("String: "_snap.Get("String")) do snap.%Next(.tSC) quit:$$$ISERR(tSC) } quit tSC }
go to post Brendan Batchelder · May 27, 2016 Ensemble provides a tool for generating HTML or PDF documentation for a production. This documentation includes all interfaces and any directories they read from or ports they listen on or ip addresses/ports they connect to, all together in a convenient list.To get to this documentation, on the production configuration page, click the "Production Settings" link which should be just above the Operations column, and then select the actions tab on the right side and there should be a "Document" button.You mentioned you're also looking for the information seen on the production monitor, such as message counts, but in a simpler view. There isn't really a more simple view of this, but if you want to try to use SQL to get the data, I would start with the Ens.MessageHeader table. There is a single Ens.MessageHeader row generated for every message sent from one component to another within a production.