#Caché

30 Followers · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Mike Kadow · Apr 27, 2016

Has anyone noticed that the Feature Map and Master Index was dropped from the 2016 version?

Anyone know why?

Please see the attached file of a screen shot.

Well, I have a screen shot file, but when I try to up load .docx, or .pdf, or html I am prevented, don't know why?

Yes, frustration!

7
0 528
Question Scott Beeson · Apr 27, 2016

I have two servers in our TEST environment.  One with HSBUS and one with HSREGISTRY.  Let's call them "HSBUS01" and "HSDB01" respectively.

Now, I can access HSBUS with my SQL client by using the JDBC driver pointed to hsbus01.full.name.com and port 1972 and specifying a namespace of "HSBUS".  I am, however, unable to access the HSREGISTRY instance via SQL with a similar combination of information.

I have access to the web interface on both servers (/csp/sys/#CSP.Portal.Home.zen).  What screen can I use to compare the relevant settings?  I think it might be a port issue.  Where would I find that

2
0 477
Question Andy Caranicas · Apr 27, 2016

We have a query that looks something like:

select a, b, c, d, e, f

from tbla inner join tblb on tbla.....

This query runs in the expected 200-400 ms range.

If we run the same query but reduce the select to just:

select a

from tbla inner join tblb on tbla.....

then the query runs for 30 minutes or more. 

The rest of the query is identical.  Is there a logical explanation for how this can happen?

Thanks.

5
0 554
Question Steve Cross · Apr 28, 2016

I have to disect thousands upon thousands of strings like this:

96842-2-AEV.00001-63561-001958-100728760I-42

I've been able to pull out the first, second and final segments as separated by hyphens, but now I have a predicament where I need to use the second segment, the 2 shown in the example above, in a join to another table.  Problem is Cache apparently doesn't like doing that.  Just the same, I have to find a way.

Here's the code I'm using to pull that segment out into as separate field in the query results:

substring(prov_record_id, charindex('-', prov_record_id) +1, charindex('-AEV.', prov_re

2
0 1126
Question Fabio Goncalves · Mar 21, 2016

Hi Community,

How can I create a JSON with the object ID by using the %Object:$toJSON API?

I have the following piece of code bellow where I create an object reference, create a %Object instance from %fromObject and them I am creating the JSON from $toJSON, but it does not expose the %ID (object id). How is the best approach to create a JSON with the respectives object IDs?

Try{Set tPersonObj = ##class(Data.Person).%OpenId(pId)If $Get(%objlasterror) $$$ThrowStatus(%objlasterror) Set tObj = ##class(%Object).$fromObject(tPersonObj)Write tObj.$toJSON()}Ca
7
0 1628
Announcement Stefan Wittmann · Apr 27, 2016

Starting with 2016.2 the Java XEP binding will no longer support the in-memory connection mode. The in-memory mode was deprecated in earlier versions and applications should switch to the TCP/IP connection mode instead.

The TCP/IP connection mode has bridged the gap in performance to a large extent over the past couple of years and enables the Java client to run on a remote machine.

Let me know if you have any questions or concerns.

This is a cross-post from our compatibility blog: http://blog.intersystems.com/compatibility/2016/04/22/removal-of-in-mem…

0
0 371
Question Steve Pisani · Apr 19, 2016

Starting off with a working REST interface, I can access the CSP Application definition screen for the application  (System > Security Management > Web Applications > Edit Web Application), and "turn off" the application by clearing the Enabled: [ x ] Application checkbox. From then on my REST calls return an HTTP 404 error. (That's expected).

However - one expects that re-enabling the Application in the CSP Application screen, would return my REST services to a working state, however, this is not happening.  All REST requests continue to return an HTTP 404 error.

SOLVED: I have solved this clea

5
0 863
Article Timothy Leavitt · Jan 5, 2016 1m read

(Possibly?) little-known fact: It's possible to use $ListBuild on the left hand side of the equals sign in a set command to extract multiple list values at once:

set $ListBuild(several,individual,variables) = list

For example:

USER>kill
 
USER>set colors = $ListBuild("red","orange","yellow")
 
USER>set $ListBuild(r,o,y) = colors
 
USER>write r,!,o,!,y,!
red
orange
yellow

See for reference: http://docs.intersystems.com/cache20152/csp/docbook/DocBook.UI.Page.cls…

This feature was news to me - I use $ListBuild lists a lot but hadn't come across it until today. Had anyone else e

4
0 499
Question Francis Galiegue · Apr 25, 2016

Hello,

Here's the code:


Method isTestClass(className As %String) As %Boolean
{
	if (className = ..#UTCLASS) {
		return 1
	}
	
	#dim c as %Dictionary.ClassDefinition
	#dim status as %Status
		
	set c = ##class(%Dictionary.ClassDefinition).%OpenId(className,,.status)
	
	if ($$$ISERR(status)) {
		throw ##class(%Exception.StatusException).CreateFromStatus(status)
	}
	
	if ('c.SuperIsDefined()) {
		return 0
	}
	
	#dim children
	#dim len as %Integer
	#dim i as %Integer
	
	set children = $listFromString(c.Super, ",")
	set len = $listLength(children)
	
	for i = 1:1:len {
		if ..isTestClass($listGet(c
6
0 596
Article Daniel Kutac · Apr 27, 2016 1m read

Hi,

I'm posting this for the benefit of others. Not often one changes certificates in Cache, at least in my case. I run a system, that uses certificates to encrypt SOAP messages, and since the last time I ran it, my certificates expired.

So I renewed them using our PKI tool, so far so good. I gave all (3) certificates the same names (and filenames too) as to those expired, thinking that everything would just work fine next time I call the SOAP service.

Unfortunately, I got trapped.

It took me a rather longer while to realize that replacing old files with new ones is not enough. You also need to DE

0
0 708
Article Eduard Lebedyuk · Apr 25, 2016 6m read

Introduction

If you manage multiple Caché instances across several servers, you may want to be able to execute arbitrary code from one Caché instance on another. System administrators and technical support specialists may also want to run arbitrary code on remote Caché servers. To address these needs, I have developed a special tool called RCE.
In this article, we will discuss what are the typical ways of solving similar tasks and how RCE (Remote Code Execution) can help.

What possible approaches are available?

Execute OS commands locally

Let's start with the simplest – executing OS comma






Иерархия классов проекта RCE





1
1 3276
Question Orion Correa · Apr 21, 2016

I've been using iFind indices in one of my applications but this morning discovered that the index is missing data. I confirmed the issue also exists in our test environment and rebuilt the indices there. That seems to have fixed the immediate problem. However I'd like to understand how this came about to avoid it happening in the future.

Has anyone encountered this before and know the cause?

We've regularly upgraded the Ensemble instance when new releases come out and are now on 2016.1. We've been using the indices for just over a year without issue except that sometimes this error comes up:
ERR

2
0 735
Announcement Francis Galiegue · Apr 20, 2016

Hello community!

Heretofore is announced a new project which aims at providing a usable library for both running unit tests and collecting code coverage information at the same time:

https://github.com/litesolutions/cache-utcov

I shamelessly admit that this is my first project written in ObjectScript; the only source file right now barely loads a %Studio.Project instance on a given namespace and fails ungracefully on failure (it HALTs; meh); and even on success it will not even list the items correctly... Well, that's part of the learning curve.

This project is of course not "innocent": for Ca

14
0 717
Edit
Article Tao Sun · Apr 20, 2016 6m read

Recently I have been working on a performance issue reporting about that Sets or Kills in the same global performed by multiple processes in a very focused time period can sometimes take a long time (several seconds) to complete. I feel this is an interesting case study to understand about some performance tunings of Caché.

Case background:

A testing routine creates multiple processes to do set (or kill) random nodes of a global in tight loop and records the timing how long a set (or kill ) operation takes.  For a global with a large number of nodes (e.g. 100,000), the observation is that someti







0
0 0
Question Fabio Goncalves · Apr 19, 2016

Does Caché support SQL CREATE SEQUENCE as in PostgreSQL?

If not, what would be the best alternative? Create my own sequence logic as the example bellow? 

 Class Util.MySequence Extends %Persistent [ ClassType = persistent, ProcedureBlock ]
{


Property dummy As %String;

Property myvalue As %Integer [ Calculated, SqlComputeCode = { Set 
{myvalue}=##class(Util.MySequence).CurrentValue()}, SqlComputed ];

ClassMethod CurrentValue() As %Integer
{
        s x=$I(^MySequence)
	Quit x
}

Method myvalueGet() As %Integer [ CodeMode = expression ]
{
..CurrentValue()
}

}

 

Thank

4
0 737
Question Andreas Zuckerhut · Apr 13, 2016

Greetings.

I'm currently struggling with launching a routine from the command prompt using ccontrol.

Basically I have a routine with a parameter which works fine using the following:
ccontrol cterminal ^ANDYTST(\"c:\temp\\\") USER

This receives c:\temp\ then in the routine.
However, when there is a space inside the parameter it assumes that it receives a script.
I can still run it using ccontrol terminal, but that then tells me the argument is invalid.
Therefore, is there something like a placeholder for whitespaces?
And, is it possible to hand it the credentials?
Or is there a better way to launch a r

3
0 1472
Question Nicki Vallentgoed · Apr 19, 2016

MessagePack is a binary-based efficient object serialization library. It enables to exchange structured objects between many languages like JSON. But unlike JSON, it is very fast and small.

Any chance of adding support for MessagePack?

2
0 485
Question Francis Galiegue · Apr 18, 2016

Hello,

For CachéQuality I'd love to be able to create issues when the programmer uses classes which are deprecated for this or that version of Caché... But short of reading all the changelogs of all versions, I can't really tell when a command appeared (for instance RETURN; I know now that it appeared in 2014.x, but it took me some time to realize that), or when a (set of) class(es) became deprecated (for instance %GlobalCharacterStream to be replaced with %Stream.GlobalCharacter -- I don't even know since which version this is true :/).

Is there an existing source which I am missing?

2
0 447
Announcement Francis Galiegue · Apr 18, 2016

Hello,

I hereby announce the creation of an IRC channel dedicated to Caché development:

* network: FreeNode (connect to server: irc.freenode.net)

* channel: ##cos (yes, two hashes).

Topic is anything related to Caché development in spite of the name (and the fact that of Caché development I only really know about COS anyway), so sorry in advance for the restrictive channel name :)

Waiting for you here! (my nick is idletask on freenode)

Side note: that would be a good opportunity to launch a project of an IRC bot in COS... My current skills however would make that project not come to fruition before

0
0 379
Announcement Stefan Wittmann · Apr 15, 2016

I am happy to share the news that Zen Mojo 1.1.1 has been released. This release includes many improvements and bugfixes, the most important are:

  • Multiple improvements for the offline bundle generation, e.g. subfolders are correctly copied to the target folder
  • Optimizations for the dojo library, including a reduced load time by prepackaging required widgets into a single JS file
  • The utility functions $show and $hide are now supported by the dojo and chart.js plugin
  • Zen Mojo now stops event propagation by default. The default behavior can be overridden by the return value of the correspon
0
0 418
Question James MacKeith · Apr 11, 2016

During a fine breakfast at Global Summit 2016 I was asked about the %DEFAULTDB database that now appears when creating the %ALL namespace. Until the documentation on "Mapping a Package Across Multiple Namespaces"  is updated to include the use of subscript level mapping for all namespaces here is a brief explanation for this change in 2016.1: When creating a global subscript level mapping in the %ALL namespace the database that was used for the non-subscripted global could not be set to be the default database for each namespace. This behavior prevents using %ALL namespace to help manage subsc

3
0 639
Question Francis Galiegue · Apr 13, 2016

Hello everyone,

I have discussed extensively with Andrew Cheshire, the author of the Atelier parser (which I'll be able to hack on and reuse for CachéQuality -- yay!), and while we were at it, we also discussed code coverage.

We ended up talking about the ZBREAK command and its /TRACE option.

It appears that combining this command and the unit test runner, we can indeed do code coverage (Andrew also told me about a way to map "back" routine lines to original lines in the source code).

So, according to the information above and this page, a sequence of possible command would be (provided we ar

4
0 438
Question Stephen Canzano · Apr 13, 2016

I interested on how others feel on this subject.  In general terms when you have a class that extends from %XML.Adaptor and you call XMLExport no validation is automatically done as part of the XMLExport process.  As an example if you do the following

SAMPLES>S tPatient=##Class(Sample.Person).%New()
 
SAMPLES>Set tPatient.Name="asdfghjklqwrrrrokkfkljbvkfbjflkbjflkbjblkjblkjdblkjblkcn l nn klkjdfkbjdlkbjlkbj"
SAMPLES>w tPatient.XMLExport(,",indent")
<Person>
  <Name>asdfghjklqwrrrrokkfkljbvkfbjflkbjflkbjblkjblkjdblkjblkcn l nn klkjdfkbjdlkbjlkbj</Name>
</Person>

where tPatient.Name has a value which

3
0 832
Announcement Francis Galiegue · Apr 6, 2016

Hello community!

Two new rules have been implemented:

OS0061: unsafe namespace switch

This rule detects when the body of a method contains two or more of the following statements:

  • set $namespace = something, or
  • znspace something.

If this is the case, it then checks whether there is a new $namespace prior to those two declarations; if not, it raises a warning.

List of issues currently found here:

https://demo.cachequality.com/issues/search#severities=CRITICAL|rules=cachequality%3AOS0061|resolved=false

OS0062: confusing identifiers

This rule detects whether either of a method argument, or a local variable

8
0 579
Article Francis Galiegue · Apr 10, 2016 1m read

Hello!

Link: https://demo.cachequality.com

In this presentation, developer oriented, we will cover this tool, how it works, how you can use it/administer it, etc. Duration 30 minutes.

The topics will include:

  • a short presentation of Caché Quality and SonarQube (which this plugin uses),
  • a demonstration of the rules and how to tailor them to your need.

Questions will be more than welcome! Hope to see you there!

And a big thanks to Evgeny Shvarov who made this possible!

0
0 684