#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Question Luiz Henrique Carvalho Martarelli · Jul 24, 2020

Hello people!

I am Brazilian and I am starting to work with the latest version of CACHE, and I would like to know where I can see an example of a TRIGGER, I would like to validate the fields before writing the actual data in the database.

in advance, thank you very much! and sorry for any mistake in concordance in english

7
0 723
Question Adrian Bourner · Jul 23, 2020

Until this week, my customer had Ensemble writing HL7 messages to my TCP listener, working fine on ageing physical servers (Windows Server 2003, Caché 2009). They had four app servers (app1, app2, app3 and app4) with an overarching DNS simply called "app".  Ensemble was connecting to "app:port", and it somehow found whichever of the four app servers my background listener was running on, and the interface worked fine for 10+ years.

4
0 328
Question Amiram Kasos · Jul 21, 2020

Hi,

Recently I have encountered a new issue, more and more 3rd party applications move to the cloud.

Web-hooks incoming from their sites can no longer be identified using a known and fixed IP address, so our customer's security department blocks them.

In past similar cases we use to grant access in the customer's Fire-Wall to the specified IP address - this is no longer applicable.

Has anyone else encountered this problem ? do you have any ideas ?

Thanks

1
0 288
Question Eduard Lebedyuk · Jul 6, 2018

Let's say I have this simple script  file try.script

write 1
write 0

I can execute it in a terminal (csession) by calling:

csession cache < try.script

And I get the following output:

%SYS>
1
%SYS>
0

However I want to use a try catch block in my script:

try {
write 1/0
catch {}
halt

But as script is executed line by line, it's interpreted like this:

%SYS>
TRY {
      ^
<SYNTAX>
%SYS>

WRITE 1/0
^
<DIVIDE>
%SYS>

CATCH {}
^
<SYNTAX>
%SYS>

I know that I can write it all in 1 line, but I'd rather not do that. Is there a way to feed multiline statement into Cache?

8
0 1330
Question craig jackson · Jul 12, 2020

Hello, I am running into a little problem.

I am trying to create a Cache Trigger on a FACS table using the SQL CREATE TRIGGER command but I am getting the message [SQLCODE: <-300>:<DDL not allowed on this table definition>].

I am not creating a persistent class but using the SQL CREATE TRIGGER command.

Please advise.

thanks.

8
0 343
Question Stephen De Gabrielle · Jun 29, 2020

Been cleaning up our production 2017.1 instance of Health Connect in preparation to a move to Health Connect 2020.1 (on IRIS!)

One thing I have found I we have built up a number of old classes and other configuration files.

It would be nice to start on the new server with a clean slate.

Is there any way to identify classes that haven't been used for a long time so they can be reviewed and removed?

Kind regards, 

Stephen

4
1 471
Question Dave Day · Jul 7, 2020

Hi,

I get this error [Cache ODBC][State : HYC00][Native Code 469] and zero rows returned with the following query.

SELECT "Timestamp","Skillset"  FROM "dbo"."iSkillsetStat" 
WHERE (Timestamp >= '2020-06-29 00:00:00' 
AND Timestamp < '2020-06-30 00:00:00')

I'm using Qlik Attunity Replicate to extract data, the query was formatted  by the tool. The query will return data in excel and SSIS, but not using Replicate.

So far I've tried using two ODBC drivers

-----------------------------------------------------

3
0 623
Article Eduard Lebedyuk · Sep 6, 2016 2m read

Let's say we have two serial classes, one as a property of another:

Class test.Serial Extends %SerialObject
{
Property Serial2 As test.Serial2;
}

Class test.Serial2 Extends %SerialObject
{
Property Property As %String;
}

And a persistent class, that has a property of test.Serial type:

Class test.Persistent Extends %Persistent
{

Property Datatype As %String;

Property Serial As test.Serial;

}

So it's a serial, inside a serial, inside a persistent object.

2
0 501
Question Meenakshi Shanmugam · Jul 14, 2020

Hi,

I am getting below error in date column in a table. I am unable to query data or find distinct or to_char on this column.

Select distinct column name from table Select column name from table Select To_Char(column name) from table

Table has 3923509 rows.

Could someone help me how can I identify bad data in this table?

Any idea how we can avoid this error?

[SQLCODE: <-400>:<Fatal error occurred>] [Cache Error: <<VALUE OUT OF RANGE>%0AmBs1+1^%sqlcq.SMTKTUAT.cls498.1>] [Location: <ServerLoop - Query Fetch>] [%msg: <Unexpected error occurred: <VALUE OUT OF RANGE>%0AmBs1+1^%sqlcq.SMTKTUAT.cls498.1>]

7
0 396
Question Julian Matthews · Jul 7, 2020

Hey everyone.

I have a use case where I need to write files to a handful of locations, and 2-3 subfolders in each location.

My plan was to extend EnsLib.File.PassthroughOperation and then pass  that operation the file and the subfolder details, and then have an operation per destination.

Has anyone done anything similar and can highlight any pitfalls I may be about to make?

3
0 344
Question Thomas Noitz · Jul 8, 2020

Hi everyone,

when I'm using the %JSONExport-function on Caché-Objects containing properties of type %integer, %numeric or %boolean, this properties are all automatically converted to Strings in the JSON-Output.

Is there a way to get around this type-cast?

Example:

Result with %JSONExport:

maxOrderable and maxReserveable are of type %integer, deliverable and assembly of type %boolean. All 4 properties are shown as quoted Strings.

Result with  ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON (same class+properties):

Thanks!

Thomas

11
0 586
Question Jenna Makin · Sep 30, 2017

hi-

Can someone give me an example of how to JOB a class method that requires an array of values to be passed to it by reference.  

This is what I tried, but am getting compile errors because of the .params

job ##class(%SYSTEM.OBJ.FM2Class).All(.params)::5

Any thoughts on how to accomplish this, the simplest way.  I would like to avoid writing all of this to some global and having to write some wrapper to pick it up and then call the class method, which I certainly could do.  but is this the only way to do it?

9
1 1624
Question Jochen Roese · Aug 27, 2019

Hi,

somehow my installation on win10 canceled during finish. "Installation of Caché finished" showed up for 20 minutes and canceled with an error I didn't saved.

Every file and service was installed but never registered as successfull installation. Now I try to reinstall it but the installer shows me everytime "Another installation is already in progress. Please finish the second installation first".

The unfinished installation is broken. I can't startup Caché from launcher. So I deleted everything in c:/intersystems

Things I already tried:

9
0 1117
Question Eriks Tauckels · Jul 3, 2020

Running cache 5.0.21 64 bit on Windows server 2016 in virtual environment. Trying to understand why every single process disk read speed (simple sql data walks) caps  around ~20MB/s, however 2 paralell such tasks on different data areas can reach 19MB/s each, four - 17MB/s each, that is 70MB/s total, etc. Also simple copy file to nul on that system reach ~400MB/s.

What can keep single query on idle system from reaching for example 200MB/s? Virtualization? Windows? Cache? Processors are below 1-3%

4
0 479
Discussion Javier Llobet · Jul 8, 2020

I was trying the %JSON.Adapter backport to cache and try it also in IRIS and i found a kind of an issue regarding to export and object to json that is an inheritance of %ListOfObjects
If we have a list of elementtype of and object and then we try to export this to a json we get this json instead of a correct json.

exported json:

{
  "ElementType":"test.element",
  "Size":"1"
}

Json that we want:

[
  {
    "field1":"testField1",
    "field2":"testField2"
  }
]

Test classes:

3
0 747
Question Gary Holt · Jul 6, 2020

Hi, we are in the process of looking to refresh our ensemble/cache environments. Currently we are using windows iis web servers with aix database servers, has any one compared cache running under windows,linux or aix ?

5
0 491
Article Robert Cemper · Jun 25, 2020 12m read

Attention:

This is a coding example working on Caché 2018.1.3
It will not be kept in sync with new versions 
It is also NOT serviced by InterSystems Support !

Full backport from IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:33 EDT

IRIS brought us an excellent %JSON.Package
It is an essential component of the Project Manager (ZPM)
This backport makes it available also in Caché and builds a base to eventually backport also ZPM.

5
0 578
Question Peter Geerts · Jul 4, 2020

Forgive my possible intrusion.  

I am not currently involved (yet) in any Intersystems deployment and/or development.
However I was triggered by an piece of (Intersystems) documentation residing under the Intersystems website discussing options  regarding 
Using MTOM for Attachments.  (https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…
)
I this article there is the following sentence: 

By default, a Caché web service behaves as follows:
2
0 366
Question Yone Moreno · Jul 7, 2020

Hello,

We wonder how could we get the following attribute:

Which is found in the response Header being sent from a Operation to a Process, when there is an exeptionWwe would need to access the Response ErrorStatus text in the Process

We have already tried:

$$$LOGINFO("..%Process.%PrimaryRequestHeader.ErrorStatus: "_..%Process.%PrimaryRequestHeader.ErrorStatus) //It shows "1"

$$$LOGINFO("$System.Status.GetErrorText(..%Process.%PrimaryRequestHeader.ErrorStatus): "_$System.Status.GetErrorText(..%Process.%PrimaryRequestHeader.ErrorStatus))  //It shows an empty string
1
0 211
Question Mathew Lambert · Jun 23, 2020

I know that 1-1 relationships are not officialy supported by intersystems cache/iris so I want to know the best way to store data with this kind of data model.

Currently I have two classes that where implemented some time ago:

Table A with a relationship type one on table B

Table B with a relationship type one on table A

To compile I have a double compile with qualifyer U.

What is the best way to implement a data model with 1-1 relationships?

Thank you

6
0 681