Hello Marc Mundt, you are right:

I have tried to comment the sentence: "do result.%Display()", so then the code would be:

However $$$LOGINFO("resultado actual: "_result.%CurrentResult) prints an empty result:

And as you said, do result.%Display(), was iterating over the result:


We now have the following code:

set statement=##class(%SQL.Statement).%New()
 
  set status = statement.%PrepareClassQuery("TablasBBDD.NotificacionesPUSH.RelacionAplicacionNotificacion","seleccionarTodo")
 
  set result = statement.%Execute()
  //do result.%Display()
 
  $$$LOGINFO("filas result: "_result.%ROWCOUNT)
 
  $$$LOGINFO("result: "_result)
 
  //$$$LOGINFO("clave: "_result.%Get("clave"))
 
  $$$LOGINFO("resultado actual: "_result.%CurrentResult)
 
  $$$LOGINFO("result number of columns: "_result.%ResultColumnCount)
 
  //$$$LOGINFO("result dumped: "_result.DumpResults())
 
  //$$$LOGINFO("resultado siguiente: "_result.%Next())
 
  set i = 0
  while (result.%Next() '= 0){
   set i=i+1
   $$$LOGINFO("i: "_i)
   $$$LOGINFO("Inside loop, current result: "_result.%CurrentResult)
   set printed = result.%CurrentResult.%Print()
   $$$LOGINFO("current result print: "_printed)
   //$$$LOGINFO("current result getData(0): "_result.%CurrentResult.%GetData(0))
   //$$$LOGINFO("current result column(0): "_result.%CurrentResult.Column(0))
  }

And when we check the trace, we see, there are 4 columns:

And we iterate once, so there is one row:

Being current result a SQL.ClassQueryResultSet:

However, why when we call:

set printed = result.%CurrentResult.%Print()

$$$LOGINFO("current result print: "_printed)

It shows:

How could we get, from result.%CurrentResult which is a %SQL.ClassQueryResultSet, the row's data? I mean, how could we print result's row's data?‽???

 

 

I have read:

- https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cl...

Hello Jeffrey Drumm,

The OBX is defined as:

And I have used your suggestion:

However messages with OBX still going to the Operation without being filtered in the Process. They are only being filtered if we write COD or FIN inside the EVN.4, but it does not take into consideration if there are OBX, or not.

Hello Eduard, I have tried your answer, however it outputs:

ESBSSCC>set enMsg = "hello"
 
ESBSSCC>set esMsg = "hola"
 
ESBSSCC>set obj = {"language1":(enMsg),"language2":(esMsg)}
 
ESBSSCC>write obj.%ToJSON()
 
WRITE obj.%ToJSON()
^
<METHOD DOES NOT EXIST> *%ToJSON,%Library.Object
ESBSSCC>w $classname(obj)
%Library.Object

Being the version:

w $zversion
Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.1.2 (Build 206U) Mon Jul 25 2016 16:47:58 EDT

And the documentation for the class %Library.Object, shows no method called %ToJSON()

Could you help me please?