#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Alexey Maslov · Sep 28, 2018

There are some classes in our code base that contain Methods only (no properties). I told my colleagues that converting them into the ClassMethods should improve performance as it would eliminate unnecessary OREF support at run-time. Some of them replied that it would be microseconds, so what is the reason to bother.

Is it possible to estimate the impact of OREF support of method calls at run-time? E.g., as a % of all CPU load. 

12
0 590
Question Julian Matthews · Oct 1, 2018

Hi all.

As part of my dysfunctional journey with FHIR, I'm looking at using the SDA3 within Healthshare to then convert to the HSFHIR format.

This is working surprisingly well, except I'm falling over when it comes to repeating fields within the SDA3 when creating the HS.SDA3.Patient object manually from within Cache.

If I take the Patient ID as an example - within a DTL, I can quite easily take an MRN and add that to the target PatientNumbers.(1).Number and then add an NHS number to the target PatientNumbers.(2).Number.

1
1 528
InterSystems Official Jeff Fried · Sep 29, 2018

InterSystems is pleased to announce that  InterSystems Caché and Ensemble 2018 are now released!

New in these releases are features that improve security and operations, including:

· Key Management Interoperability Protocol (KMIP) support
· Microsoft Volume Shadow Copy (VSS) integration
· Integrated Windows Authentication support for HTTP
· SSH enhancements

0
0 1782
Article Gevorg Arutiunian · Sep 27, 2018 2m read

The following class method "test" contains code that can create a new class, create new properties for classes, or create new methods for classes. "test" runs all three of these processes once, and the code that performs each action is labelled by comments in the method:


ClassMethod test() As %Status
{
	set sc = $$$OK
// Create a class
set class = ##class(%ClassDefinition).%New("MyClass")
set class.Description = "This is my test class"_$c(13,10)_"testing %ClassDefinition"
set class.Super = "%Persistent"

// Create a property and add it
set property = ##class(%PropertyDefinition).%New("MyClass.MyProperty")
set property.Type = "%String"
set property.Description="This is a property"
set sc1 = class.Properties.Insert(property)
do:$$$ISERR(sc1) $system.Status.DisplayError(sc1)
set sc = $$$ADDSC(sc, sc1)

// Create a method and add it
set method = ##class(%MethodDefinition).%New("MyClass.MyMethod")
set method.ReturnType = "%Integer"
set method.FormalSpec = "x:%Integer,y:%Integer=10"
set method.Description = "Return product of x and y"
set method.CodeMode = "code"
set method.Code = " new result"_$c(13,10)_" set result=x*y"_$c(13,10)_" quit result"
set sc2 = class.Methods.Insert(method)
do:$$$ISERR(sc2) $system.Status.DisplayError(sc2)
set sc = $$$ADDSC(sc, sc2)

// Save the class definition
set sc3 = class.%Save()
do:$$$ISERR(sc3) $system.Status.DisplayError(sc3)
set sc = $$$ADDSC(sc, sc3)

return sc

}

Here's a link to the code on GitHub

1
2 773
Question Roberto Cahanap · Aug 16, 2018

Let's say I have something like this:

Query ClientList(BusinessType As %String) As %SQLQuery (CONTAINID = 1, ROWSPEC = "Name:%String(MAXLEN=100),AltName:%String(MAXLEN=100)") [ SqlProc ]

{...}

Is there a way I can specify the MAXLEN by a function or a calculated method?

Like maybe:

MAXLEN=#(..GetLengthName())#

Or is this something that has to be hardcoded in Studio?

6
0 1122
Question Ciaran Mooney · Sep 22, 2018

Hi,

I am running terminal on Cache on a Mac High Sierria and going through the ObjectSript tutorials.

However there is no instruction on the Intersystems website as to how to open Studio.

Does anyone know how this is done?

Thanks

11
1 1653
Article Chris Stewart · Apr 24, 2017 2m read

or "Bonus Breakage"

In our last lesson, we added a relationship between 2 persistent classes.  We are clearly going to need to start creating REST Services to expose CRUD operations for each of these classes, but before we do that, we should really finish defining our linkages.  We added code to our Widget toJSON to spool off related Accessory data, so we should really do the reciprocal and allow Accessories to return all Widgets that are compatible.

2
1 1349
Announcement Dmitry Maslennikov · Sep 24, 2018

I have already mentioned my project CacheBlocksExplorer recently in two articles

  1. Internal Structure of Caché Database Blocks, Part 2
  2. Internal Structure of Caché Database Blocks, Part 3

Now I would like to inform that this project can be easily run with docker.

Version for Caché and for InterSystems IRIS, now publicly available on docker hub.

Remember that you need the appropriate license key (for RedHat Linux) to be able to run this project.

Caché

0
1 375
Question Rui Figueiredo · Sep 22, 2018

Hi,

We maintain a few Zen reports that output in Excel format.

Recently we started to observe that some reports fail and return the following error.

CSP error occurred
Error: Error rendering: OS code =1Use $log=1 to check
ErrorNo: 5001

I have extracted the exception details from the log file

1
0 584
Question Rosti Zacharias · Sep 22, 2018

Hi,

Somewhat weird behaviour in testing values in a resulting query.

I have a table where I need to read through a list of data, and apply a charge for matching occurrences. However, only ONE charge for one set of data. I have applied a DISTINCT function to the query, but as I cannot get a completely unique set, the DISTINCT function does not de-duplicate all of the sets.

I have therefore attempted to look for a value that if it repeats for the one data set, I can choose to skip the function that applies the charge.

2
0 303
Question akio tanaka · Sep 20, 2018

Since I installed CACHÉ with mac, I can not use CACHÉ CUBE, so I put windows 10 in the virtualbox, installed CACHÉ and made cube usable. The problem is, When you press the cube mark, ·studio ·Terminal · Management Portal · Remote system access · Preferred connection server (F) [TRYCACHE 2] · Cache version management (b) · End (x) Inside of the above ·studio ·Terminal · Management Portal (P) Can not be selected.

Why?

The purpose of using CACHÉ is to refurbish existing projects.

2
0 381
Question akio tanaka · Sep 21, 2018

Open the studio of CACHÉ,

When you click something, A dialog for server connection is displayed, Please select CACHÉ server from the list. Although it is described, if you select Local [127.0.0.1 [1972]],

User name _system password

Will be input. In this case, what should I enter a password? Is there a default password? Or do you set your own password?

3
0 587
Article Gevorg Arutiunian · Sep 13, 2018 1m read

The following code snippet includes a class method "test" that runs code to find a class based on the class's name. "test" takes one argument, which is the name of the table:


Class objectscript.findTable Extends %RegisteredObject
{
	classmethod test(name as %String="mytable")  
    {
			#Dim result as %ResultSet
			#Dim tName as %String
			#Dim contain as %Integer
		Set contain=0
		Set result = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:Summary")
		Do result.Execute()

		While(result.Next()) 
		{
			Set tName=$get(result.Data("Name"))
			&sql(select position (:name in :tName) into :contain)
			Write:contain'=0 tName, " ... ", name, " (", contain,")", !
		}
	    Return $$$OK
 }

}

Here's a link to the code on GitHub

6
0 841
Question Santhosh Gladson · Sep 20, 2018

Hello Experts,

I am working on SOAP WSDL, where I am getting below error, I could not figure out where the error is hitting in code. Error says,

"ERROR #6248: SOAP response is a SOAP fault: faultcode=Client faultstring=Badly formed SOAP Message faultactor= detail= <error xmlns="http://www.intersystems.com/trak/ws"> <text>ERROR #5002: Cache error: &lt;METHOD DOES NOT EXIST&gt;zXMLNew+1^Custom.ENXX.Integration.WebService.Schema.DemogData.1 *%New,Custom.ENXX.Integration.WebService.Schema.DemogData</text> </error>"

3
0 2176
Question akio tanaka · Sep 21, 2018

I installed the evaluation version of CACHÉ.

There is a CACHÉ launcher (gray), If you click it you can not select the terminal.

What is the cause of this?

First, set the preferred connection server · Server name IP address · Port: 1972 Telnet port: 23 · Web server port: 57772 · Web server ip adress CSP server instance ·comment Authentication method Password or kerberos

Does it become like the terminal can be used if setting it?

Please reply.

6
0 403
Article Gevorg Arutiunian · Sep 20, 2018 2m read

This code snippet determines the day of the week associated with a date. The class method "test" takes a date as a string in "mm/dd/yyyy" format, and returns an integer corresponding to a day of the week:


Class cartertiernan.getDayfromDate Extends %RegisteredObject
{
	classmethod test(date) as %Integer {
		//Set date = $ZDATE(date) //  Looks like: mm/dd/yyyy
    Set monthList = $LISTBUILD(0,3,3,6,1,4,6,2,5,0,3,5) // (Jan,Feb,Mar,Apr,...)
    Set centuryList = $LISTBUILD(6,4,2,0) // first two digits divisiable by 4, then subsequent centuries. EX (2000, 2100, 2200, 2300)
    Set dayList = $LISTBUILD("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") // Index goes from 0-6
     
    Set day = $PIECE(date,"/",2) // get the day 
    Set monthVal = $LIST(monthList,($PIECE( date,"/",1 ))) // get the month value
    Set first2DigsYear = $PIECE( date,"/",3 ) \ 100 // get the last 2 digits of the year
    Set last2DigsYear = $PIECE( date,"/",3 ) # 100 // get the first 2 digits of the year
     
    // Used for DEBUG perpouses
    /*write !,"day: ",day
    write !,"Month: ",monthVal
    write !,"last2: ",last2DigsYear
    write !,"first2: ",first2DigsYear
    write !,"cen Val: ",$LIST(centuryList,(first2DigsYear # 4) + 1),!!*/
     
    // Look here for formula explination (its the "Basic method for mental calculation")
    // http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
    Set dayOfWeekVal = ( day + monthVal + last2DigsYear + (last2DigsYear\4) + $LIST(centuryList,(first2DigsYear # 4) + 1 ) ) # 7
 
    Quit dayOfWeekVal
}

}

Here's a link to the code on GitHub

(originally posted to CODE by Carter Tiernan, 6/18/14)

1
1 1164
Question akio tanaka · Sep 20, 2018

I installed an evaluation version of Caché now.

The Windows version of the Caché client component kit is required to manage and operate Linux or Mac machines with Caché installed. The Windows version of the Caché kit includes client components. Although it is written,

How can I get the Windows version of the Caché client component kit? If you do not use the Caché client component kit, you can not use CACHÉ on Mac, right?

Is it better to install windows os on virtualbox and use Caché?

Please answer.

1
0 356