#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Stella Ticker · Apr 29, 2017

What is the correct way to write embedded SQL that will use a Like operator and local variable. Ex How can a sql query return the IDs of all rows where LastName has the substring "Doe"?

Set nameToFind="Doe". The below does not work.

&sql(Select ID from myTable where LastName like '%:nameToFind%')

Simple enough but this syntax is tricky!!

3
0 4360
Question Raghuram Devarakonda · Apr 27, 2017

Hi,

I am wondering if there is a way I can change the GUID of an instance. The use case is that I am restoring from a backup on an alternate host and start the instance there. However, the restored instance ends up with same GUID as that of source. Is there a way I can tell this newly restored instance to use a different GUID?

Thanks,

Raghu

19
0 905
Question Richard Housham · Apr 27, 2017

Hi I'm hoping the community will once more help me out with a question!

Right I have a production that takes an attachment from an email and processes it, sending out a hl7 message at the end. This works ok.

Now I just need to take the email and send it back out to a 'backup' email address, basically giving
a) A backup incase there is a problem with the email or something else further down the line.
b) A log of the emails receieved.

So I thought the best thing to do is have an operation with an email adapter and to send that my message.

6
0 906
Question Samuel Dujardin · Apr 26, 2017

Hi Everybody,

I'm trying to restore database to a 2016.2.2.853 caché version but i've some problems ...

Into my backup file, i've 6 namespaces. After use the Do ^DBREST and configure all namespace into the portal, I can only reach 2 of 6.

when I write zn "blabla" into the terminal, i've got this error message :

ZN "blabla"
^
<DIRECTORY> *r:\data\blabla


Of course, Database and namespace are correctly define.


I've try this on a previous version of caché (2015.2.2.811) and it's working fine.
So, do you already got this kind of issue with your caché server ?

Tanks a lot for your help!

Sam

3
0 1252
InterSystems Official Andreas Dieckow · Apr 27, 2017

The last version of Caché, Ensemble released for VSI OpenVMS is 2017.1. Unlike HP OpenVMS (Alpha and Itanium), VSI OpenVMS on Itanium continues to be supported. This means that critical corrections or changes required to support customer’s hardware purchases will all be based on 2017.1 or earlier versions.

Related announcement: https://community.intersystems.com/post/platform-compatibility-hp-open-…

0
0 1013
Edit
Question Mike Kadow · Apr 26, 2017

I need some help on navigating through the DC.

I never know where I am, what comes next, what was previous.

Do I just mindlessly go from post to post? 

A least when I use to receive email on the posts, I had some control.

0
0 0
Article Chris Stewart · Apr 20, 2017 3m read

We finished our last lesson with our Widgets Direct page iterating over a list of widgets, displaying an ID and a Name value.  While we have been able to achieve this with only a small amount of coding, the page itself is not the most visually appealing place to be.  The AngularJS framework is providing a powerful Model-View-Controller framework for our structure and logic, but it does not implement anything that will provide a nice UI experience.  For that we need to implement a UI toolkit.  We have numerous options here; the leading toolkits are BootStrap from Twitter and Angular Material

3
0 1843
Question Pasi Leino · Apr 11, 2017

We are building a bunch of rest based services using Ens 2016.2 to serve our browser based application (Angular 4).

Two questions:

1. The initial authentication seems only work if credentials are placed in the url parameters.  Trying to use the Authorization header instead, the client code immediately complains about Access-Control-Allow-Origin. How can I resolve this?

2. After initial authentication, what is the proper way to send subsequent rest calls without having to include credential every time?

I have Parameter UseSession As Integer = 1 in my service class, but what else do I need to do?

7
0 2879
Article John Murray · Apr 24, 2017 1m read

If your application is raising <PROTECT> errors and you're finding it hard to work out why, here's a way to get additional information.

First, if auditing is not already enabled, turn it on:

Then use "Configure System Events" (highlighted above) and locate the event named %System/%Security/Protect. In the screenshot below I used the Filter field to do this (type "protect" - highlighted below - and press TAB):

1
0 2887
Question sansa stark · Apr 22, 2017

when the "/apps/docmatic/%CSP.SysConnection.cls" gets hit. If some page hit the above (%CSP.SysConnection) it consume license or not?

1
0 357
Question Sean Connelly · Apr 19, 2017

WebSockets look to be supported reasonably well in Cache. I have yet to use them in production so I am wondering how well it has worked for other developers.

In particular what happens when the browser does not support WebSockets, or when a firewall blocks the connection.

Have you had to write your own long polling fall-back?

I've read the documentation and found this interesting article...

https://community.intersystems.com/post/asynchronous-websockets-quick-tutorial

but no mention of long polling fall-backs that I can see.

15
0 11876
Question Stella Ticker · Apr 21, 2017

I am using a %Stream.FileCharacter object  and LinkToFile API to write to a file on a folder. The file is written line by line . Something like  below:-

Set tStream =   ##class(%Stream.FileCharacter).%New()

Set tStatus =tStream.LinkToFile("MyFileName")

For i=1:1:X  { Set result = ..process(i) Do tSream.WriteLine(result) }

1
0 1101
Question Susobhan Pandit · Apr 20, 2017

I am working in Cache Objectscript where I need to process around 0.2 million data.

I am executing SQL query through "%Library.ResultSet"

Code Example:

Set tsRSet=##class(%Library.ResultSet).%New("<query name>")
Set status = tsRSet.Execute(<param 1>,<param2>)
While tsRSet.Next()
{
     Business Logic
}

Is there any limitation of the above code when the number of records the query is fetching is high.

If the query returns 0.5 million to 1 million record will my code work properly or it may break due to high volume of data.

I have 4 GB RAM and 2 GB global buffer in my production system.

4
0 552
Article Chris Stewart · Apr 21, 2017 2m read

At the end of our last lesson, we ended with our page displaying a nice (but garish) Angular Material Toolbar, and our Widget data displaying in a list of Material cards.  Our page feels a bit static, and we already know that the large number of Widgets that we will be dealing with will not be especially usable on a static list.  What can we do to help?

0
0 1505
Question Paras Batheja · Mar 15, 2017

Hi,

We have a application developed in CSP and JS. Is there any way to make this application available in multiple language like Spanish etc.

We are ready to re-write the code in Zen also if it supports that feature.

Could any one of you please assist/advice a Solution to reach the required goal using Cache technologies, it will be a great help if someone has any sample code for the same.

Thanks 

Paras

7
0 574
Question Everardo Cunha · Apr 19, 2017

I wonder if you could help me? I have a regular cache class that accepts a variable number of arguments in one of the methods. It works fine so I decided to add a method to my web service to make the call to the cache class. I get a compile error on the web service with error#5130.

Here is the cache class

class method GenerateFileFromSQL(file As %String, sql As %String, delimiter As %String = "", args...) As %Status

and here is the web service code that calls it:

ClassMethod GenerateFileFromSQL(file As %String, sql As %String, delimiter As %String = "", args...) As %String [ WebMethod ]
 

2
0 933
Question Roger Beeman · Apr 20, 2017

Hi All -

I was wondering if the below query could be enhanced to automatically look back 24 hours from the current datetime the query is run. As is now I, of course, have to update the date range in the WHERE clause manually.

The query is just getting all MessageBodyClassNames, counting them and then doing an AVG on TimeCreated and TimeProcessed. Nothing too complex.

SELECT MessageBodyClassName, count(ID) as Count_Of_Messages, avg(datediff(ss, TimeCreated, TimeProcessed)) as avg_processing_time_in_seconds

FROM %PARALLEL Ens.MessageHeader

1
1 2767