go to post Dmitry Maslennikov · May 7, 2016 You could just pass this arguments in Execute method, something like this new $namespace set $namespace="%sys" Set tRS = ##class(%ResultSet).%New("%SYS.Journal.File:Search") Set tSC = tRS.Execute("test", "/opt/cache/mgr/journal/20160507.001") if $$$ISERR(tSC) { do $system.OBJ.DisplayError(tSC) } do tRS.%Display() this code will return all offset's which contains text - 'test' You must remember that this query should be executed only in %SYS namespace. Usually we could use some another modern ways, which allow us to call queries. set statement=##class(%SQL.Statement).%New() set tSC=statement.%PrepareClassQuery("%SYS.Journal.File","Search") if $$$ISERR(tSC) { do $system.OBJ.DisplayError(tSC) } Set tRS = statement.%Execute("test", "/opt/cache/mgr/journal/20160507.001") or even much shorter set tRS=##class(%SYS.Journal.File).SearchFunc("test", "/opt/cache/mgr/journal/20160507.001") do tRS.%Display() But unfortunately such code snippets does not work in case when Query does not contain any parameters in his original declaration.
go to post Dmitry Maslennikov · May 6, 2016 126 error means - The specified module could not be found.So, you have dependency issue, so I recommend to use dependency tool which I suggested before, to find what you need.
go to post Dmitry Maslennikov · May 6, 2016 After this error you should look at cconsole.log, where you can find error code, why loading was failed.Mostly there are two errors with loading dll in cache, using 32bit dll instead of 64bit. And if this library has unsatisfied dependencies, in this case I'm using this tool to find such dependencies.
go to post Dmitry Maslennikov · May 4, 2016 Well, you can't write conditions in this way, and compile error which you see, it is actually parsing error for such conditionHow you can change it, You should define some function which may do all this check or partially, just return some value for check. To define such function, you should have your child for Ens.Rule.FunctionSet class, something like this Class Test.Utils Extends Ens.Rule.FunctionSet { ClassMethod GetAt(value As %String = "", index As %String) As %String { if $isobject(value) { quit value.GetAt(index) } quit "" } } and then, you can use it in this way, where GetAt your just created function. <rule name=""> <constraint name="msgClass" value="Test.TestMessage"></constraint> <when condition="GetAt(Document.myList,1)="AA""> <send transform="" target="DummyOperation"></send> <return></return> </when> </rule> But your function should return final value for checking, and you can't use write so, GetAt(Document.myList,1).property1="AA"
go to post Dmitry Maslennikov · May 2, 2016 If that routine uses curly brace style, such label should be marked as public. More details here
go to post Dmitry Maslennikov · May 1, 2016 Only two way to do it, Mapping with %ALL namespace as suggested Timothy, or %-class which as you already know by default mapped to all namespace, but I said how you should name your class, to send this class to Write-enabled database.
go to post Dmitry Maslennikov · May 1, 2016 First of all you should know that namespace it is not final destination for any data in Caché. Namespace just defines easy access to set of data, but all data stores in databases. And any security settings uses on Databases not for Namespaces. DataThere some reasons why you can't just use any %-classes; By default all %-classes, appeared in CACHELIB database, which read-only by default after installation.CACHELIB database after any installation process, will be overwritten with all you custom content.Actually first point is not so truly, because InterSystems gives us one chance to create %-class, without loosing it after next upgrade. You should use %Z* or %z* name for classes and routines (some names have already reserved for InterSystems use), and in this case that classes will be stored at CACHESYS database, which available to write, and any upgrade will not rewrite such classes. So, you should read this page in documentation, to know more about names, which names you can't use, and how to name recommend.
go to post Dmitry Maslennikov · Apr 28, 2016 Sure, it should work, CACHE.DAT format is platform independent. You even can mount to another version, lower or higher.
go to post Dmitry Maslennikov · Apr 21, 2016 You can try to change your login through wrc app. Contact Details -> Select Contact, where you can enter new login in Username field.
go to post Dmitry Maslennikov · Apr 21, 2016 Stefan, do you know, why was removed $toJSONFormat() method? it was quite useful method
go to post Dmitry Maslennikov · Apr 18, 2016 That's why I use this code in my projects set stream=##class(%Stream.TmpCharacter).%New() do Result.$toJSON(stream) while 'stream.AtEnd { write stream.Read() }and such write, instead of simple do stream.OutputToDevice()because, sometime I got unreadable response in this case, don't know why, may be because of gzip
go to post Dmitry Maslennikov · Apr 18, 2016 There are some ways to retrieve this value set tSC=##class(EnsPortal.Utils).ItemSettings("Production.Name||Item.Name",.settings,.colNames) in this case you can find something like here $lb("Core","PoolSize",1,1,"",3,"Number of jobs to start for this config item. <br>Default value: <br>0 for Business Processes (i.e. use shared Actor Pool) <br>1 for FIFO message router Business Processes (i.e. use a dedicated job) <br>1 for Business Operations <br>0 for adapterless Business Services <br>1 for others <br>For TCP based Services with JobPerConnection=1, this value is used to limit the number of connection jobs if its value is greater than 1. A value of 0 or 1 places no limit on the number of connection jobs.","%Library.Integer","","0","","","",0,"Pool Size","Additional","Additional Settings","") Or just open this item, and get this property directly if ##class(Ens.Config.Item).NameExists("UT.Client.GPK.Production","RS.Transformation",.id) { set item=##class(Ens.Config.Item).%OpenId(id) write item.PoolSize }
go to post Dmitry Maslennikov · Apr 18, 2016 Caché has very useful feature names as Mapping, in your case you can look at Global MappingsHow it can help now. With a mapping you can split your globals which stores your tables.For example You have table Sample.Person, with globals ^Sample.PersonD for Data and ^Sample.PersonI for indices.then you may create new databases like PERSONDATA1, PERSONDATA2 and PERSONINDEXAnd create mappings likes on pictureIn this case we send first 10000 rows to database PERSONDATA1, and all next data to PERSONDATA2. When you decide to split it again, just create new database, and edit mappings.And you can place every database in any place as you want.But in future releases we expect to see new feature: Distributed SQL
go to post Dmitry Maslennikov · Apr 15, 2016 You can't change how project looks like in Studio, but with SourceControl class, you can organize your files for your source control as you want.
go to post Dmitry Maslennikov · Apr 3, 2016 In any way it is possible to check how this Global Buffer uses, with very useful tool ^GLOBUFF. And if you see that about 80-90% of buffers have already used, it means that you should increase Global Buffer size. %SYS>d ^GLOBUFF Find which globals are using the most buffers. Display the top <25>: Total buffers: 32768 Buffers in use: 2163 PPG buffers: 23 (1.063%) Item Global Database Percentage (Count) 1 rOBJ CACHESYS 37.540 (812) 2 rOBJ CACHELIB 27.323 (591) 3 oddCOM CACHELIB 9.154 (198) 4 oddDEF CACHELIB 7.258 (157) 5 %qCacheMsg CACHELIB 4.438 (96) 6 oddCOM CACHESYS 3.375 (73) 7 SYS CACHESYS 2.681 (58) 8 ROUTINE CACHESYS 0.693 (15) 9 ISC.Monitor.AlertD CACHESYS 0.509 (11)
go to post Dmitry Maslennikov · Apr 1, 2016 In troubleshooting with license, very useful tool is $system.License You may check validity any key for current instance. s sc=$system.License.IsValidKey("C:\InterSystems\Ensemble14\mgr\cache.key",.restart,.reason) if 'sc { d $system.OBJ.DisplayError(sc) } else { w sc } command to see all available functions Do $System.License.Help()
go to post Dmitry Maslennikov · Apr 1, 2016 And with latest announce from MS, such thing will be possible to do for Skype, with Skype Bots.
go to post Dmitry Maslennikov · Mar 28, 2016 LOG^%ETN it is very useful but in most cases overkill. And may take several seconds to gather full stack.and maybe used for any logging, but should have filled $zerrorsome time for logging I use such code.set $ze="test",t=$$LOG^%ETN,$ze=""