Much better If it would be possible to migrate or merge two accounts here. I have a WRC account on email from my current company, but what happens when I chnage a job. In this case I may loose access to any my content here. And I have another registration with my own email. It would be very nice if I could merge two of this accounts or something else, if I could use WRC and commonity with the same my own not corporate account.

Unfortunately output window, just ignore any control characters, and not sure that is possible now.

Dmitry Maslennikov · Mar 11, 2016 go to post

In our project we started to use it when InterSystems suddenly moved %cspSession global from CACHETEMP to CACHE. And after that, all our chnages in %session.Data started journaling. And to prevent it, we use %ALL to map this global to CACHETEMP.

Dmitry Maslennikov · Mar 11, 2016 go to post

How about this way, just 

USER>s rs=##class(%File).FileSetFunc("c:\intersystems\")
 
USER>d rs.%Display()
Name    Type    Size    DateCreated     DateModified    ItemName
C:\InterSystems\Deltanji        D               2016-02-08 18:11:24     2016-02-08 18:21:28     Deltanji
C:\InterSystems\EMS     D               2013-10-22 10:10:17     2014-05-12 11:44:27     EMS
C:\InterSystems\Ensemble10      D               2013-01-12 09:28:38     2015-11-06 12:25:53     Ensemble10
C:\InterSystems\Ensemble14      D               2013-10-22 10:00:14     2015-11-06 12:29:29     Ensemble14

Much simplier, end returns %SQL.ClassQueryResultSet

*Func available since 2012.2

Dmitry Maslennikov · Mar 11, 2016 go to post

Murray thanks for your articles. 

But I think, should be mentioned metrics related to Write Daemon too, such as WDphase and WDQsz. Some time when our system looks works too slow, it may depends how quickly our disks can write. And I think in this case it is very usefull metrics. In my own experience I saw when in usual day our server started to work to slow in we saw that writedaemon all time was in 8 phase, and with PhyWrs we can count how many blocks were really written on a disk, and it was not so big count in that time, and so we found a problem in our storage, something related with snapshots. And when storage was reconfigured, our witedaemon continued to work as before quickly.

Dmitry Maslennikov · Mar 16, 2016 go to post

Is anybody knows why Studio in Windows7 through Parallels which connected to server on the host, too often says  that  connection have been lost, and offers to restart Studio? Version used on both sides 2016.1.

Dmitry Maslennikov · Mar 16, 2016 go to post

John looks like you worried about your leadership in this contest, not sure that somebody could do more than you, in just one day now. 

Dmitry Maslennikov · Mar 16, 2016 go to post

No, I've already bought Parallels. I thought that Parallels, much better in some cases then Fusion. And I don't even know how to localize this problem, because after restarting studio, it seems like everithing works well, but sometime  when it happens when I edited some file, and studio locked it, then I need to kill previous Studio's job.

Dmitry Maslennikov · Mar 18, 2016 go to post

Luca, may I ask, what exactly means InterSystems supports Docker now. I have not found anything about docker in documentation in version 2016.1. Actually I see that you already use docker with version 2015, and with 2016 I still have to use ccontainermain. It would be better if we could just use ccontrol for the same functionality as it now used ccontainermain.

Dmitry Maslennikov · Mar 24, 2016 go to post

Thanks for the reply Luca, of course, I know that I can write my own script for it, and your ccontainermain it is a very good solution. And it works quite well, and with some my modifications, more informative now. And I hope that I can help to improve this tool.
Now I am goid to write an article (in russian yet), about Docker+Caché+HAProxy, not as a micro-service, but with ECP, my containers will work as ECP-Applications with registration on HAProxy. And on github I have some questions which I now faced, when worked on it.

Dmitry Maslennikov · Mar 28, 2016 go to post

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 $zerror
some time for logging I use such code.
set $ze="test",t=$$LOG^%ETN,$ze=""
 

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()
Dmitry Maslennikov · Apr 18, 2016 go to post

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
}
Dmitry Maslennikov · Apr 18, 2016 go to post

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

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.

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.

In my opinion, it's more looks like by mistake, not sure why it could be done in other ways, it still working, with some limitations but any way.
We can wait what would say InterSystems, may be they will fix it in future.

Dmitry Maslennikov · May 10, 2016 go to post

As for me, when I have to investigate some strange behavior in my application, I prefer to read all journal files or limited by time, and then all records, and then I have some some to find exactly what I need, like only kill records or only sets, and only for some concrete global references. So, my usual code looks like this:

     set exit=0
    set docId="14105401"
    set jrnFile=##class(%SYS.Journal.System).GetCurrentFileName()
    do {
        !!,jrnFile,!
        set jrn=##class(%SYS.Journal.File).%OpenId(jrnFile)
        quit:'$isobject(jrn)
        
        #dim rec As %SYS.Journal.Record = jrn.FirstRecord
        set last=jrn.End
        set pr=0,opr=0
        do {
            set pr=$j(rec.Address/last*100,0,2)
            if pr'=opr write $c(13),pr_"%" set opr=pr
            
            if rec.%IsA("%SYS.Journal.SetKillRecord") {
                set glb=rec.GlobalNode
                if $qs(glb, 0),"^My.Global",$qs(glb, 1)=docId {
                    !!,rec.Address,!,glb
                    !
                }
            }
            
            set rec=rec.Next
            read q:0 set exit=q="q"
            quit:exit
        while $isobject(rec)
        quit:exit
        
        set sc=jrn.GetPrev(jrnFile, .jrnFile)
    while $$$ISOK(sc)
    quit

This code looks all journal files, file by file from latest to oldest, and show progress for current journal file, and shows offset if it found something interesting

Dmitry Maslennikov · May 13, 2016 go to post

Many times I need to get some link from documentation, to show particular part to someone. And some time it is quite difficult to get such link, and the worst place in Class References, where I can't get good link for a particular part of class.

So, what I need is, an active icon with link, which then I can use, and for Class reference too.

As an example github.

Dmitry Maslennikov · May 18, 2016 go to post

It's is not good idea, not all time and not everywhere I have an access to google, but I have an access to my installation, and I have to search on my local machine. And such search should be support browser's search engines. And then I could do something like this.

with settings

But Ensemble documentation, should provide their own search engine to install in my browser without any manual operations. As it possible to do with AddSearchProvider

Dmitry Maslennikov · May 30, 2016 go to post

Well, my code below

toPhone(s  = "") {
  s r="",c=96,p=1 f i=3,3,3,3,3,4,3,4{s:$i(p) k="" f j=1:1:i s k=k_p,c($c($i(c)))=k} f i=1:1:$l(s){s n=$g(c($e(s,i)),0) s:$e(n)=$e(r,*) r=r_" " s r=r_n} q r
}

In first I'm generate a plane array with all variants, and then just get all numbers from it, include space between identical numbers, and zero for unknown symbols such as space

Dmitry Maslennikov · May 30, 2016 go to post

and 149, with a little bit changes

ToPhone(s = "")
{
 s r="",c=96 f p=2:1:9{s k="" f j=1:1:3+(p=7)+(p=9) s k=k_p,c($c($i(c)))=k} f i=1:1:$l(s){s n=$g(c($e(s,i)),0) s:$e(n)=$e(r,*) r=r_" " s r=r_n} q r
}