go to post Ernesto Fischer · Aug 10, 2022 When using the old stream classes (%Library.GlobalXXXXStream) you should never set a stream property A to the oref from another stream B, as the Location value of stream B will be copied into stream A. You should use CopyFrom to avoid this Location change. Taking @Lorenzo Scalese sample method add2(), it should be rewriiten as: ClassMethod add2() As %Status{ Set o = ..%New() Set st = ##class(%GlobalBinaryStream).%New() Do st.Write("azeruiop") //Set o.st = st Do o.st.CopyFrom(st) Quit o.%Save()} If you use the new stream classes %Stream,GlobalXXXX, the original code from method add2() will keep the Location from stream property: ClassMethod add2() As %Status{Set o = ..%New()Set st = ##class(%Stream.GlobalBinary).%New()Do st.Write("azeruiop")Set o.st = stQuit o.%Save()}
go to post Ernesto Fischer · Apr 23, 2020 It's not a pretty solution but you can achieve it using a terminal script (iristerm/cterm). The script will call your routine and when it ends it will throw a popup alert informing that your routine did finish. It will not bring the terminal to the foregroung but you get the alert. Save this to a file: send: d ^myRoutine<cr>wait for: USER>execute: mshta vbscript:Execute("msgbox ""Routine myRoutine finished processing."",48:close") In terminal, press ALT+S and select the your script file and when the routine ends you will see a popup.
go to post Ernesto Fischer · Apr 9, 2020 The code below does want you want. While textreader.Read() { If textreader.NodeType = "element" { Set elementName=textreader.Name } ElseIf textreader.NodeType = "chars" { Set elementValue=textreader.Value Set practices=practices_elementName_":"_elementValue_" " } } Write practices
go to post Ernesto Fischer · Feb 7, 2018 Hi Rui,You can handle the reportHeight in the OnAfterCreateDisplay call back method.But on how to gather the information on the number of records will depend a lot on how your report is written. If you could post or attach a sample report will help.Regards,Ernesto
go to post Ernesto Fischer · May 10, 2017 Hi Yuriy,Currently there are no API's to convert XML to JSON but it can be done quite easily in different ways.One approach you can use is if your XML has always the same structure, you can create a class(es) in HS that corresponds to this XML structure. With this class(es) you can now use %XML.Reader and method Correlate() to load the XML into the class(es). Here you can find more information about this:http://docs.intersystems.com/ens20162/csp/docbook/DocBook.UI.Page.cls?KEY=GXML_importAfter correlating the XML to your class you should then use method %WriteJSONStreamFromObject from class %ZEN.Auxiliary.jsonProvider to dump this object in JSON format into a stream. Documentation is here:http://docs.intersystems.com/ens20162/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25ZEN.Auxiliary.jsonProvider#%WriteJSONStreamFromObjectThere is also a string version of this method but your JSON will need to fit in up to 3.5MB.This is the simplest approach but it relies on being able to represent your XMLs as a class (or classes) in HS.Another approach is to use some external third-party library to convert XML to JSON. There are several open source libraries for Java, .Net, Python, and others.
go to post Ernesto Fischer · Oct 2, 2016 I have my Windows configuredwith keyboard as "US International", this makes it very easy to get quite all of these accented and special letters.I just type a single quote ' folowed by an e and get é. This is very usefull if you need to write in languages that have accented characters like all latin ones.Of course there are some cons, like if I want a single quote I need to type ' followed by a space so I get it on screen and it does not get combined with another letter that can have accent variations.
go to post Ernesto Fischer · Oct 1, 2016 Hi James,The wshttpbinding is part of the WS-ReliableMessaging specification and there is support for it in Caché. Take look at Caché's documentation:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAPSEC_wsrm