Hi Eduard,

I have found some old code to visualize a WordCloud using iKnow.

This code is showing the concepts of a source, and adds weight according to a simple tf/idf score.

I have put the (old) code on github here

The code is using %iKnow.Queries.EntityAPI.GetBySource, and the CSP page is using the jquery library from AwesomeCloud to render the wordcloud. (Today I would not use CSP pages anymore with Caché script or CSP tags, but like i said, it is old code;)

After importing the xml from github, the url to call looks like this :

http://localhost:57772/csp/user/WordCloud.csp?domain=pubmed&source=240

and the result would be something like :

Caché can call any OS command (if it has enough rights) by using $ZF(-1 (see also article https://community.intersystems.com/post/callexecute-exe-windows-objectsc...)

In the OS command script, you can use ccontrol to the other Caché instance (see article https://community.intersystems.com/post/starting-routine-windows-command... as an example)

But i would prefer using Webservices to call a routine from one Caché instance the other :  then you don't need to put the two Caché instances on the same server : see  webservices doc https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...

Hi Scott,

Here is some code that stores the sizes of all globals for a database, if you create an entry in the task manager to run this code every day, you will see in the global  ^tempSize which globals grow faster than others :

do ##class(Utils.Database).GlobalSize()

(please change the code to store the results in a global that does not exist, or better, in a persistent class)

Class Utils.Database
{

ClassMethod GlobalSize(dir As %String = "")
{
   If dir="" Set dir = $zu(12,"") ;current directory
   #Dim today as %Integer = $zdate($H,8)
   #Dim sqlStatement as %SQL.Statement = ##class(%SQL.Statement).%New()
   #Dim sqlResult as %SQL.StatementResult
   #Dim sc as %Status = sqlStatement.%PrepareClassQuery("%SYS.GlobalQuery","Size")
   Set sqlResult = sqlStatement.%Execute(dir,,,,,1) ;1=fast mode
   While sqlResult.%Next() {
      set ^tempSize(sqlResult.%GetData(1),today)=sqlResult.%GetData(2) ;^tempSize(yyyymmdd,global)=allocated blocks
   }
}

}

If you substract the current day-of-the month from the current date in $horolog format, you will end up with the first day of the current month in $horolog format :

Write $horolog - $zdate($horolog, 4) + 1

If your date is in another format, convert it using $zdateh/$zdate, see also :

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

and

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

Turn on Auditing (Portal -> System Admin -> Security -> Auditing -> Enable Auditing, configure system events to audit login failures ).

It can give you a clue on why you are getting Access Denied.

It could be an issue of licensing : check the system dashboard for Licensing use (maybe you have too many connections open).

If all this does not help, you can also turn on ODBC logging in the ODBC DSN.

Hi Laura,

Can you look at the directory where your cache.dat is located.

If a database is mounted, there should be a cache.lck file with the root directory  and name of the Caché that mounted it.

If the root/name is not the same as your Caché system, it will not mount it as RW.

Best is to stop Caché (or dismount the database), remove the cache.lck, and mount/start Caché again.

(If you are sure that this DB is not used by another Caché).

hi Dmitry,

i gladly take your hints, this is precisely the goal of this article series : to comment and discuss code and make it better or point out alternative code.

Using streams is to be preferred over the Open command (like showed in Bert's code), you can see the age difference in comparing our code !

I limit the use of standalone Else to checking a timeout.

For example:

Lock +^MyLock("MyBatch"):1 Else  Quit "job is already running"

which is identical to 

Lock +^MyLock("MyBatch"):1
If '$Test {
    Quit "job is already running"
}