#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Question Bapu Hirave · Aug 4, 2016

Hello Cache experts,

Has anyone tried using Cache object script to check windows service is running or windows service installed or not on same computer or remote computer ? basically i am trying to develop cache program which will check "windows service" running or installed on current computer or remote computer. Based on the status of this windows service, i want to write some business logic in our application. Any suggestions will be more welcome

1
0 552
Announcement Rustam Ibragimov · Aug 4, 2016

Hello, guys. 

We have recently created a syntax highlighting for COS for Atom text editor. You can find it on https://github.com/intersystems-ru/atom-language-cos

Installation: 

  1. Download or clone this repository
  2. Copy everything to ~/.atom/packages/
  3. If you have your Atom editor open, then you need to reload it (enter  Window: Reload in Command line)

It's been few days since the release, so please if you find a bug, let us know through creating an issue or forking and making a pull request. 

P.S. After it gets more or less usable, we will use this syntax as a basis for GitHub highlighting for COS.

0
0 603
Question Lucy Arnold · Aug 3, 2016

Hello,

I'm using studio for the first time.  I copied the Security.Users Class to my own UCDavis.Security.Users

I can't edit the copied file.  I totally get why I can't edit the Security.Users class - but why is it stopping me from editing the class I created??

Thanks in advance!

Lucy

4
0 815
Article Mark Bolinsky · Jan 25, 2016 1m read

The release of IBM POWER 8 processors with AIX 7.1 introduced up to 8 SMT threads per processor core (logical or physical).  Which SMT level (1, 2, 4, or 8) to use can be confusing and varies based on multiple factors.  This article is meant to help with a starting point for your specific application.

Firstly, if running on a version of 2014.x or older, it is advised to use SMT 4 or lower.  SMT 8 with those older versions of Cache' has shown a decline in performance and scaling in benchmarking applications.

3
0 2963
Question Joan Cruz · Aug 2, 2016

Hi all,

I'm using $ZUTIL(49) to get information of the databases I want to add to a mirror. This information is passed to ##class(SYS.Mirror).CatchupDB(plstPathDatabases)  in order to Catchup all databases addes to a Mirror.

I know that ZUTIL is deprecated and I'd like to know what function or functions I have to use in order to get all necessary information for CatchupDB.

Thanks a lot

11
0 811
Question Mike Kadow · Jul 18, 2016

I have a NewBie Question.

I have been playing around with "Basic CLass Queries."

I  have defined a very simple "Basic Class Query." (see below)

However, I cannot find in the I/S documentation how to execute this query.

Any help is appreciated.

Class LastName.BasicClassQuery Extends LastName.Person
{
Query Display() As %SQLQuery (ROWSPEC="ID:%Integer,Name:%String", CONTAINID = 1)
{
SELECT %ID, Name FROM LastName.Person
 ORDER BY DOB
}
Storage Default
{
<Type>%Library.CacheStorage</Type>
}
}
8
0 2646
Question Michael Gosselin · Jul 29, 2016

Hello,

I've been doing this for years.  Well, decades.  And, I pride myself in being able to break other people's code.

However, sometimes I don't apply the same dedication to breaking my code.  That needs to change. wink

So, I'd like to ask people, what are some of the things you like to test for when trying to stress-test your code?  I'll start with what I like to try testing to see what crashes, what works unexpectedly, and what I've handled.

I always test the following: 0; 1; -1; some 20-digit number; some 50-character string; 1/0; 2E12; " ", and an undefined variable.

6
0 616
Question Jean Millette · Jul 25, 2016

We are creating a package (written in Caché Object Script) that will provide access to an external DB (MySQL). Because applications that use our package will be run from machines with various, potentially unexpected, operating systems, we’d like to establish a connection to the external DB without using DSNs (we’ve heard that setting up DSNs on certain non-Windows machines can be cumbersome and problematic).

4
0 1253
Question Laura Cavanaugh · Jul 29, 2016

I'm getting the above error.  My zen page calls other javascript methods  and other server methods just fine.  But when I call my  method, I get the error.  Yes, I've tried making it look exactly like the methods that work.  But for some reason, it doesn't seem to know that DoLogout is a zen method. 

Anyone ever get this error?

THanks

L

for example

ClientMethod logout() [ Language = javascript ]  {   zenPage.DoLogout();  }

Method DoLogout() [ZenMethod]   {   //blah blah  }

3
0 1037
Question John Murray · Jul 28, 2016

Studio's "Package Information" dialog, accessed from the context menu of a package on the Namespace tab of the Workspace pane, includes a field titled "Routine Prefix"

Help says this is a "String that is used as a prefix for the routines generated from classes in this package".

But if it set a string here, then recompile a class in the package, it doesn't affect the name of the generated routine(s). Nor does it influence the routine names generated when I create new classes in the package and compile them. I have tested on 2016.1.

2
0 424
Question Wendy Griffiths · Jul 22, 2016

I want to override the Get and Set methods of a class property.  The class maps to a pre-existing global. The property is defined like so:

Property Invalid As %Library.Boolean;

with the property mapping to a node like ^GLOBAL(Code,"INVALID")=1
Code is a property in the same class.

The value can be 0 or 1 or the node might not exist. When it doesn't exist I want the value of the SQL field to come out as 0 (false).

12
0 1838
Question Kevin Furze · Jul 26, 2016

Cache 2015.2

I need to get a sort order stored in my database with mutiple decimal places, but I want the string stored and retrieved EXACTLY as I enter it. so if someone enters 700.3000 I don't want cache to treat it as a decimal and strip the trailing zeros storing it as 700.3

once it comes back, I want the sorting to sort AS STRINGS, again, none of that stripping training/leading zeros.

this ay, I can create local arrays in exactly the order they think? they created them

3
0 533
Question Laura Cavanaugh · Jul 26, 2016

i'm looking for a way to display a list of tables in an application.  I need a Table or Schema API, and I can't find one.  I found this:

http://docs.intersystems.com/latest/csp/docbook/%25CSP.Documatic.cls?PA…

with a google search, but I'm not sure if I can even use this (it says that SQL name is "TABLES"), or how to use it.

Is there a way to get at the table names available in a namespace?

Thanks,

Laura

10
0 1361
Article Mark Bolinsky · Nov 19, 2015 1m read

There are many storage technologies available today from various vendors.  The storage technology and configuration best for your application depends on the application access patterns and workloads.  

The attached document discusses the various design considerations and recommendations for various technologies.  This guide is to help you during discussions with your storage vendor to determine the appropriate storage technologies and products that will work best to meet the performance goals for your applications.

3
0 601
Question Rustam Ibragimov · Jul 26, 2016

Hello, guys.

I have a set of file names (e.g. file.cls, file2.mac and so on) and I need to check whether these files are mapped in %ALL or current namespace.

I found that if I open Globals in the current namespace I can see mapped packages. And If I open this global I see all files that are  to this namespace and %SYS. The problem is these files are enumerated in a json object(apparently)

ex. "{""class"":{""%Activate.Enum"":{},""%Activate.GenericObject"":{""CreateObject"":0,""GetObject"":0},""%Activate.HandleEvents"")

But, is there a way to determine whether this file is mapped using some method? 

1
0 395
Article Daniel Kutac · Jul 18, 2016 3m read

Cache tricks

Several years ago, long before Developer Community Portal was launched, I published a series of Caché tricks at one of Czech web sites. In this article, I’m posting translated version of one of them.

Capturing output of someone else’s methods or routines

Suppose you, or someone else created a useful method or routine, that was producing some computation that you’d like to benefit from, but the routine was writing output to process principal device.

4
0 2870
Question Pavel Pogorelov · Jul 25, 2016

Hi,

I want to create a table with a dynamic display of data using the DataGrid.

On the page there  dataCombo and the table.

According to the plan, when the user selects an item in dataCombo the table is filled with data. If select another item - data is updated.

But in fact, the data in the table are loaded once when the page is loaded, and when I select value in DataCombo, I receive an error:

I would be happy if you tell me how to fix it.

Thank you.

1
0 464
Question Adrian Kerr · Jul 25, 2016

Let's say that we wish to store the documents sent to us via all of our Customers, and that the documents could be in PDF, spreadsheet, RTF, plain text, Comma-Separated-Values and XML.

It would be hoped that %Stream.Object would be a good choice of property to hold these documents, especially as you would expect %Stream.Object to morph between BINARY (for PDF, spreadsheet, RTF) or CHARACTER (for plain text, CSV, XML) depending on which type of stream was being persisted.

3
0 468
Article Rob Tweed · Jul 25, 2016 2m read

Today I'm releasing a new EWD 3 module - ewd-feder8.

ewd-feder8 is a federation or integration platform, built as an extension of the EWD 3 ewd-xpress module.  So what does it do and what's it for? 

It's all about federating and integrating multiple web or REST service end-points.

At its simplest you can use it as a proxy server in front of a remote web service or REST end-point.

0
0 480
Edit
Article Mike Kadow · Jul 22, 2016 2m read

NewBie's Corner Session 14 Inline Do & Nested Do with Implied Quit and For Loop

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

InterSystems Caché provides a GUI (Graphical User Interface) based Integrated Development Environment (IDE) called Caché Studio. Developers can use Studio to create and maintain applications.

0
0 2
Question Renee Cannon · Jul 20, 2016

I am building a SOAP service using Caché 2016.1.  

If I set %session.Preserve=1 in OnPreWebMethod and I set a variable in my service method, why don't I see the variable in the CSP session processes' variables after I call the method?  

The documentation says "The original motivation for the provision of a state-aware mode of operation was to make it relatively easy to migrate legacy application code from a fixed client-server environment (e.g. terminal applications) to the web. Support for transactions that spanned several HTTP requests was also a consideration in its introduction."

1
0 437
Article Timur Safin · Jul 18, 2016 15m read

This article created as side effect of preparations to the longer set of articles about simple, but still handy MapReduce implementation in Caché. I was looking for relatively easy way to pass arguments to (potentially) multiple targets via remote calling facilities. And after several attempts I have realized that we do have very powerful mechanism in the Caché ObjectScript which might be of particular help here – dynamic dispatch for methods and properties.

7
0 1289
Question Juliana Schallert · Jul 20, 2016

Hi,

I am new to Cache and I am trying to convert a JSON string (msgdata) that contains a JSON payload to an object to be saved into a Driver. Entity table.  I am running into 2 issues and would appreciate any help:

1) It seems that when the 1st element of a list within the payload (Choices) is an empty string, after I call %ConvertJSONToObject, the obj.%data("payload").Choices contains just 1 empty element, removing the next 3 valid values (10,20,30). The same does not happen if I change the input to [10,20,"",30], in this case it works correctly.

3
0 1093
Question Rustam Ibragimov · Jul 20, 2016

Hello, guys. 

I want to add a class to my project. This class is in UDL format. 

I know that there is a method:  ##class(%Compiler.UDL.TextServices).SetTextFromStream. The problem is that to use this method I need to know the name of the class (including all packages) in advance. But,  a class can have any name(I mean C:/source/AAA/BBB/CCC.cls, but the real name is Sample.Human.cls).

For now I found only one way to get to know the name of a class - just parse the class code and search for a word which is followed by "Class" word. Is there any better way to do that? 

6
0 464