#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Rajath Muthappa · Nov 8, 2016

Hi,

I am using the &sql () tag to retrieve the value from the Cache DB.

below is the piece of code i am using:

script language="cache" method="retrieveDetail" arguments="pVariable" returntype="%String" &sql( select columnA, into :tempVariable1 from TABLE where COLUMNC = pVariable

quit tempVariable1

i have to return the ColumnA value back to the calling procedure.

can i know how it can be done ? since i am getting an javascript error.

4
0 499
Article Matthew Giesmann · Nov 8, 2016 4m read

Beginning in Caché 2013.1, InterSystems introduced Outlier Selectivity to improve query plan selection involving fields with one atypical value.

In this article, I hope to use an example 'Projects' table to demonstrate what Outlier Selectivity is, how it helps SQL performance and a few considerations for writing queries.

Selectivity

1
0 805
Question Ray Hitchins · Nov 7, 2016

Hi,

I have a problem which i think has a simple solution but which i and others haven't yet cracked. I want to display text output to a text box in monospaced font. At the moment the style sheet is shown below, I have tried various other options such as specifying a specific font such as Courier New.  None of the browsers I have tried (Safari, Firefox on OSX, IE) display as monospace, although the last 2 come close. I wonder whether I need a <pre> tag, but I can't see how to do that in Zen.

Suggestions?

1
0 348
Article Peter Steiwer · Nov 7, 2016 2m read

Whether you are accessing DeepSee for the first time ever or you are configuring DeepSee on a new instance, there are two common issues that are encountered after clicking on the “DeepSee” option in the System Management Portal.

Issue #1: Architect/Analyzer is grayed out!

Issue #2: DeepSee must be enabled before use.

Issue #1: Architect/Analyzer is grayed out!

There are two common causes for this problem.

Cause 1 - License

Cause 2 - Security

1
0 1659
Question Nikita Savchenko · Nov 5, 2016

Hello!

The question I have today is the next. Suppose I have this simple class describing the REST application:

Class Playground.Rest Extends %CSP.REST
{
XData UrlMap
{
<Routes>
   <Route Url="/index" Method="GET" Call="Index"/>
   <Route Url="/logout" Method="GET" Call="Logout"/>
</Routes>
}
ClassMethod Index() As %Status
{
write "You're logged in as " _ $Username
quit $$$OK
}
ClassMethod Logout() As %Status
{
write "Bye, " _ $Username _ "!"
do %session.Logout(1)
quit $$$OK
}
}

And a web application itself with the password protection option enabled:

8
0 1482
Question Nikita Savchenko · Nov 2, 2016

Hello community!

I am trying to set up Startup Tag^Routine field for the UnknownUser as follows:

And my simple routine is the next:

Calling do ZitRoStart^ZitRo in the terminal prints "Hello", but when opening Caché Terminal it results with the next:

And the terminal closes.

// Cache for Windows (x86-64) 2016.2 (Build 636U) Wed Apr 13 2016 20:58:35 EDT

What am I doing wrong in setup?

Thank you very much!

6
0 856
Question Laura Cavanaugh · Nov 4, 2016

Here's an easy one for you; before I spend another hour looking for the answer, how do you convert %ArrayOfDataTypes to an array (that could, say, fit into the %session.Data array, or maybe just some array named info()), and of course back again?

NS>s aodt=##class(%ArrayOfDataTypes).%New()
 
NS>w aodt.SetAt("lcavanaugh","username")
1
NS>w aodt.SetAt("organization","coolcompany")
1
NS>w ##class(%ArrayOfDataTypes).BuildValueArray(aodt,.array)
 
<LIST>zBuildValueArray+1^%Library.ArrayOfDataTypes.1

aodt must be serialzed.  What?

NS>zw array

NS>

3
0 1174
Article Isaac Aaron · Jun 21, 2016 1m read

Hello

I have noticed that Cache (2016.1 at the time of writing) doesn't come with a systemd startup script for RHEL7.

Here is a small example script I have built.

[Unit]
Description=Intersystems Cache

[Service]
Type=forking
ExecStart=/bin/bash -c '/usr/cachesys/cstart 2>&1 | logger -t cache_start'
ExecStop=/bin/bash -c '/usr/cachesys/cstop quietly 2>&1 | logger -t cache_stop'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

The file should be placed as /usr/lib/systemd/system/cache.service

After saving the file, use these commands to install and run the Cache service

8
0 2320
Question sansa stark · Nov 4, 2016

Hi All, when I ran the Command to make a folder in particular directory its not working in terminal,but when i run the same command in studio output block it create the folder. Used command: S cmd="mkdir E:\DIRECTORY" O cmd:"QR":10 Suggest Please.

4
0 659
Question Jenna Makin · Oct 5, 2016

Hi-

I have created a class that extends %Persistent and %Populate and have set the various POPSPEC attributes of my properties to control how the  properties are populated.  However, when I compile the class and try to run the Populate() method it tells me the method isnt defined.

Here is the class definition:

2
0 1097
InterSystems Official Steve Brunner · Nov 4, 2016

InterSystems is pleased to announce that Caché and Ensemble 2016.2.1 are now available as maintenance releases.

 

For a complete list of the corrections in 2016.2.1, please review the release notes.

 

Caché and Ensemble 2016.2.1 are available for the same platforms as 2016.2.0.  The complete set of supported platforms, including specific point releases and patches, is detailed in the Supported Platforms document.

 

The HealthShare team will announce availability of its products separately.

 

The build corresponding to this release is 2016.2.1.803.0

0
0 393
Question Sabarinathan M · Nov 3, 2016

I try to run the cmd command in the studio terminal, but i am getting the <NOTOPEN> Error.

Even ZF(-1) also not working. Any help, Please!!!

Note: i restart the Cache instance service with full privilege

Code:

Set Path="mkdir E:\Sample\New"

Open Path:"QR":10

Error:<NOTOPEN>

This command working on my PC, but on server throws error.

Many Thanks

3
0 1248
Question Uri Shmueli · Nov 3, 2016

Can somebody explain this behaviour of Cache (and many other calculating machine as well) :

WRITE 1/3*12

4

WRITE 1/3*5

1.666666666666666667

W 1/3*18

5.999999999999999999

W 1/3*21

6.999999999999999999

W 1/3*24

7.999999999999999999

How can we make more occurate caculations in Cache ?

2
0 752
Question Evgeny Shvarov · Oct 28, 2016

There is an interesting discussion in the Russian forum going. 

What is the best solution for the function which returns the max for the set of parameters?

From the listed solutions I like this one:

ClassMethod max(args...) {
  for i=1:1:args {  max(+$g(args(i))) = }
  i=""max=$o(max(i),-1, iQ $lb(maxi)
}
8
0 1080
Article Otto Medin · Nov 1, 2016 1m read

A group of students at the Chalmers University of Technology (Gothenburg, Sweden) tried different approaches to automatically rating the quality of emergency calls, including iKnow.

Excerpt: "The most impressive results produced by iKnow is its ability to correctly classify 100% of the calls using the Average algorithm. This is quite surprising since iKnow only compares low-level concepts, how words relates to each other."

Full story: http://publications.lib.chalmers.se/records/fulltext/244534/244534.pdf

1
0 509
Question Christopher de Melim · Oct 31, 2016

Hello Everyone.

Sorry if it is a dumb question, but I'm new.

First: I have to create a Excel MultipleSheet Report. That I'm fine with doing.. but they want me to give every Workbook that is created it's unique reportName, that is generated with the user input on the page. Is it possible to do so?

7
0 632
Question Ricardo Paiva · Oct 5, 2016

I am using OAuth2 Cache framework, acting as a client to an authorization server. My setup is based on this excellent previous post [Caché Open Authorization Framework (OAuth 2.0) implementation – part 1].

I'm facing ‘Authorization Server Error: Error Processing Response - No match between server name 'googleapis.com' and SSL certificate values google.com…’

It looks like I should set SSLCheckServerIdentity to false but I can’t figure out how. Has anyone had the same issue?

4
0 1434
Article Stephen Walasavage · Nov 1, 2016 2m read

This post is meant to provide a quick possible explanation for a very perplexing problem.

Scenario:  You’ve just created your own administrative user in your 2014.1 (or later) instance of Caché.  You gave it every possible security role (including %All), so it should in theory be able to do anything within the instance.

You’ve written a very advanced routine with a break command in it for debugging:

MyTestRoutine
            set ^MyInitGlobal = 1
            write "Hello, my name is..."
            break
            write "Steve"
            quit

1
0 575
Article Jonathan Levinson · Nov 1, 2016 1m read
    Don’t use Python built into Mac.  Because of System Integrity Protection (SIP) you will not be able to access the libraries that the InterSystems Python binding requires.  The Python build into the MAC has baked in what libraries it can use.Install another Python.  Don’t put this other ahead of Mac Python on path since this could break things.  Apple regards its Python as part of the its OS, and may use that Python in its system operations.This Python will not be installed into the protected area.  Mac does not want you messing with its Python.Use explicit path to invoke this other Python.  
0
0 419
Article Olga Phomina · Nov 1, 2016 9m read

The topic of reflection hasn't been raised in Caché forums or blogs too often. Perhaps, it happened because the notion of reflection is not explicitly defined in Caché. However, it exists in Caché and can be a very useful development tool.

3
1 1629
Question Alan Nguyen · Nov 1, 2016

Hi,  

In Cache Studio under the View/Find in Files.  Anyone knows how to search multiple words in the string?   For example,

In my routines 1, it has "Patient Name   Test Name    Provider    Address   Status  " and

In my routine 2 , it has "Patient Name   Test Name    Provider    Address "

In my routines 3, it has "Patient Name      Address "

 When I search, I want to search all the routines, it has the words  Provider and Status which I want it returns only routine 1 because it has both words "Provider and Status".   Thank you very much for your help.

1
0 880