#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Article John Hotalen · Sep 29, 2016 1m read

Checking if Directory or File Exists:

Outlined below is an example of how to check if a directory exists:

Set directoryName="c:\temp\nosuchdir"

/* Check for existence of a directory - Return Value:  0 - directory does not exist;  1 - directory does exist  */

Set directoryExists=##class(%File).DirectoryExists(directoryName)

If ('directoryExists)  // do the processing for when a directory does not exist


Outlined below is an example of how to check if a file exists:

1
0 3360
Question Chris Bransden · Sep 29, 2016

Hi all,

We're creating a series of RESTful APIs that output data from a Cache database (made up of global storage that we've mapped to classes). I'm running into some problems with object-to-JSON conversions when relationships are involved. Eg:

ParentClass has children relationship to ChildClass

ChildClass has parent relationship to ParentClass

1
1 724
Announcement Derek Robinson · Sep 26, 2016

Click here to view our OAuth 2.0 Overview

InterSystems created this video as a high-level overview of OAuth 2.0 technology, geared toward developers looking to learn the basics of OAuth 2.0.  It will teach you how OAuth 2.0 works, what roles are involved, what benefits it can provide, and how InterSystems Caché can be used with this technology.

3
0 673
Question Ponnumani Gurusamy · Sep 22, 2016
Hi ,
 1.  I will ready to write  a cache Developer Certification Level1. 
 2.  How to prepare this exam and any mock test available.
 3.  Where place to I will write exam . (Online as I will write a exam in my home place ).
 4. Will i Complete and pass 1st level , you will provide certificate.
1
0 695
Question Scott Beeson · Sep 27, 2016

I need to do an UPDATE via SQL and I would like the statement to return the `ID` column of each row that is updated.  MS SQL has an "OUTPUT" statement, but I don't see anything similar in Cache.  Is there a way to do this?

4
0 885
Article Mike Kadow · Sep 24, 2016 1m read

NewBie's Corner Session 29 Documentation on the Caché/MUMPS Global Structure

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

This post contains several links to very good documentation of the Caché Globals Structure.

Like I said, "Perhaps the most difficult concept in Caché/MUMPS is its Global Structure."

universalNoSQL.pdf - http://mgateway.com/docs/universalNoSQL.pdf

by Rob Tweed and George James

Extreme Database programming with MUMPS Globals

http://gradvs1.mgateway.com/download/extreme1.pdf

by Rob Tweed

Documentation from InterSystems on Globals

6
0 548
Article Steve Wilson · Sep 23, 2016 2m read

 Windows 7 and some other Microsoft Operating Systems can shutdown too fast for large applications, such as a Cache instance with a large amount of data and changes, to close gracefully. This results in the instance being forced down by the OS and so causing problems on the next start up.

To solve this we can change the OS shutdown timeout values to give Cache more time to close gracefully. We do this by editing some settings in the Registry.

1.Click Start (on Win 7) and type “regedit” and make sure you run registry editor as administrator.

 

9
0 2357
Article Eduard Lebedyuk · Sep 26, 2016 2m read

We're developing Ensemble PoC and one day our frontend developer (who doesn't have Ensemble production running) said that Populate just doesn't cut it and he needs to see the real data. He needed only one object, but the problem was - it's a big object. Still, I checked ids of everything related and wrote this command (parts omitted, but you get the idea):

1
0 807
Question Ponnumani Gurusamy · Sep 23, 2016

I tried to get a image from user . But It did not run. So please solve this problem

Class Quadramed.Chennai Extends %Persistent
{
Property Image As %Stream.FileBinary(LOCATION = "C:/Images");
Method imagefile()
{
obj = ##class(Sam.binary).%New()
"enter your name",img
obj.Image.Write(img)
status = obj.%Save()
}
 

5
0 1191
Article Mike Kadow · May 12, 2016 2m read

NewBie's Corner Session 1 Installing Caché

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Session 1 - InterSystems Inc. allows you to download a single copy of Caché to your personal computer at no cost. This is available from www.InterSystems.com.  It is at this link: https://download.InterSystems.com. You will first need to register yourself with InterSystems. Follow the instructions on how to download the install file. Choose the full version of Caché, not the Client Components.

11
0 1320
Article Mike Kadow · Jun 23, 2016 2m read

NewBie's Corner Session: 9 Documentation and books

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

To access your documentation:

Assuming you have installed Caché, (see NewBie's Corner, Session:1),

Click on the InterSystems cube in the Windows system tray, then choose Documentation.

Or – another method you can use to access your documentation:

Assuming you have installed Caché, (see NewBie's Corner, Session:1),

Click on the InterSystems cube in the Windows system tray, then choose Preferred Server,

From the drop down menu choose Add/Edit

4
0 610
Question Rich Taylor · Aug 18, 2016

I have setup an async reporting mirror member with Read only access.  My problem is that if I try to do any sql reporting against that data I am getting errors.  I am sure that this is because the DB is read only, but I had assumed that setting up a reporting mirror would handle this.

I there a setting or mapping  I am missing?

7
0 838
Question Ponnumani Gurusamy · Sep 21, 2016

How to get a input in array collection with class properties.

Class collect.arraylist Extends %Persistent
{
Property DOB As %Collection.ArrayOfDT;
ClassMethod valu()
{
list = ##class(collect.arraylist).%New()
""your DOB:", DOB1
do list.arraylist.SetAt("DOB1",0)
}
 

3
0 1217
Edit
Article Carter Tiernan · Sep 21, 2016 2m read

Overview

Current Caché system monitoring functionality provides real-time information about a Caché environment. This allows for preventative measures to be taken before system failure by highlighting specific metrics when they are at unusual or dangerous values. Additionally, diagnosis of past or current erronious events is aided by informative logs that are created by the system monitoring process.

0
0 0
Edit
Article Carter Tiernan · Sep 21, 2016 1m read

Overview

The The System Monitor Dashboard project is, most generally, an open source extension to the Cache System Monitor.

More specifically, it allows users to customize the monitoring of a Cache environment as well as how the collected data is visualized.

Goals

  • Displays important system state and historical information in an accessible and useful way.
  • To provide an intuitive and complete API for users to tailor the Cache System monitoring to their specific needs.
1
0 0
Question sansa stark · Sep 20, 2016

Hi all,

         In CSP page we get data from Class via Query method.

         <TD valign=top>#(DEOBJ.Get("Comments").Read())#</TD>

         The problem is we couldn't get the stream property value.

        (Property Comments As %Stream.GlobalBinary)

Thanks,

sansa.

         

2
0 397
Question Michael Broesdorf · Sep 19, 2016

Do you have any experience / recommendations / best practice on how to update server-side data residing in a Cache database via a REST service?

A naïve approach would be to send a full JSON representation of the data object via an http POST to a method on a REST handler class: 

<Route Url="/mydata/:id" Method="POST" Call="Update"/>

The problem I see here is, if only one of the data object's properties has changed, how do we know which? Or do we simply overwrite all properties? 

3
0 665
Question Jenna Makin · Sep 19, 2016

Hi-

This almost seems like a silly question, but I am new to REST services.

I have a rest service that has a method for adding records to my database. 

<Route Url="/userdetails" Method="POST" Call="SaveUserDetails"/>
 

My REST client sends data using json in the body of the request.  I have verified using debugging tools that the data is actually being sent.

On the server side in my SaveUserDetails method where do I find the json?

What is the proper way to serialize that json into an object?

2
0 1588
Question Rustam Ibragimov · Sep 17, 2016

Hello, guys.

Say I have two horologs or timestamps, how can I compare them? I know that just time1 > time2 doesn't work because it will compare them as strings which is not correct. 

6
0 3282
Edit
Article Thomas Carroll · Sep 17, 2016 3m read

Embedded SQL is a tool that allows us to execute SQL statements in Caché Object Script. For example, to select the name of a person with a particular SSN from the Sample.Person class we can do the following.

&SQL(

SelectNameinto:tName

FromSample.Person

WhereSSN = :tSSN

)

The colon syntax is used to identify local variables, in this case tName and tSSN. &SQL indicates to our compiler that this is SQL syntax. At compile time, this statement will be optimized to executable Object Script code. More about this syntax can be found here.

0
0 0