#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question David Cui · May 24, 2020

I can run the following commands from the AIX command line prompt without any problem

-bash-2.05b$ echo t
t
-bash-2.05b$ echo œ
œ

When I call from insider cache, I have problem.

USER>D $ZF(-1,"echo t")
t

USER>D $ZF(-1,"echo œ")

D $ZF(-1,"echo œ")
^
<TRANSLATE>

I am using cache 2017.2.  Can someone shed some light?

Thank you.

5
0 297
Question Paul Hula · May 22, 2020

Hi All,

   It must be the groundhog days but I can't solve something that I know I've done before.  I have a legacy CSP page on a version of Cache without JSON and just pure Cache.

  I need a CSP page that takes a .xlsx file, manipulates the file (in COS) and then returns a new manipulated file.

  My CSP Page gets the file fine, the problem is then returning the response with the new file as an attachment.  I don't want to pipe to a new csp page with a different content-type so was sure I can set %response.Headers etc to get the reply stream I want.

6
0 929
Discussion Evgeny Shvarov · Mar 24, 2017

Hi, Community!

Would you please share your best practices for utilising 3rd party modules (say community solutions, frameworks, development tools/utils).

There are two approaches which I like:

1. New namespace for every new module

So, if you install something you install it in special separate namespace/database. MDX2JSON/DeepSeeWeb case.

If the package is intended to be used in other namespaces, map the packages to %All and have it available in all the namespaces in this Caché/Ensemble.

And there is one more benefit: it is easy to uninstall the module, just delete the namespace/database.

5
0 557
Question Ronnie Fish · Apr 28, 2020

Has anyone recently deployed the cache-git-studio plugin from Github repo?

In particular, I see that this plugin is installed at the namespace level, so it appears for each user have their commits in their own name, they must all be running a locally installed cache server when doing their dev work. I suspect that is the preferred way.

In my organization they are currently just accessing a remote cache server from Studio. In that scenario, it looks like it would be one installation of git for the whole team. and thus only one shared git user.

3
0 702
Question Henry Pereira · May 20, 2020

Hi community,

I need to write an SQL query  to fetch a random record from a table, that table has millions of data.

In postgresql, for example, there is a RANDOM() function to do something like that:

SELECT column FROM table
ORDER BY RANDOM()
LIMIT 1

Is it possible to do something like that in Caché?

Thanks in advance

8
0 976
Article Marc Mundt · Jun 30, 2016 3m read

The Caché System Management Portal includes a robust web-based SQL query tool, but for some applications it’s more convenient to use a dedicated SQL client installed on a user’s PC.

SQuirreL SQL is a well known open source SQL client built in Java, which uses JDBC to connect to a DBMS. As such, we can configure SQuirreL to connect to Caché using the Caché JDBC driver.

Finding Caché’s JDBC driver JAR

10
1 11047
InterSystems Official Pete Greskoff · May 20, 2020

InterSystems has corrected two defects that affect online backup of very large databases. Backups taken via external methods, such as snapshots or direct file copies, are not affected. These defects exist in all released versions of all InterSystems products.

The first defect only affects databases with more than 231 blocks. It results in a degraded database after restoring from an online backup. For example, databases that have a block size of 8 KB (the default) are only affected if they are larger than 16 TB. The correction for this defect is identified as RJF437.

0
0 285
Article Murray Oldfield · Feb 20, 2017 3m read

Note (October 2022): yape has been deprecated and replaced by YASPE, there is no more development on yape.

Note (June 2019): A lot has changed, for the latest details go here

Note (Sept 2018): There have been big changes since this post first appeared, I suggest using the Docker Container version, the project and details for running as a container are still in the same place  published on GitHub so you can download, run - and modify if you need to.

5
2 2036
Question Yone Moreno · May 19, 2020

Hello,

We are trying to connect to a database through a JavaGateway.

We observe that the JavaGateway reports:

Failed to start the Java Gateway server: ERROR #5002: Error de cache: <UNDEFINED>zGetJavaVersion+22^%Net.Remote.Service.1 *versionWithPrefix

We have checked that we do have the Java Home set:

/usr/java/jdk1.8.0_65

And we have seen the java files in the server:

We have read the code where the exceptions being raised:

2
0 728
Question Laura Cavanaugh · May 11, 2020

Hello all, I have a question about constucting thousands of clones, and scope.

In my code, I'm looping through a database, say 200k+ objects, and creating a clone of each object (we need to evaluate a modified clone of the object, but not account for what's on disk).  

I see this a lot in the documentation:

7
0 844
Article Murray Oldfield · Apr 1, 2016 2m read

Previously I showed you how to run pButtons to start collecting performance metrics that we are looking at in this series of posts.

##Update: May 2020.

Since this post was written several years ago, we have moved from Caché to IRIS. See the comments for an updated link to the documentation for pButtons (Caché) and SystemPerformance (IRIS). Also, a note on how to update your systems to the latest versions of the performance tools.

2
0 1734
Discussion Murillo Braga · May 13, 2020

Hello guys, 

I have used the Studio SOAP wizard to generate some webservice client classes and amongst those classes:

Class RMH.SOAP.s0.Output Extends (%Persistent, %XML.Adaptor) [ ProcedureBlock, SqlTableName = _Output ] {
...
Property Value As %GlobalCharacterStream(XMLNAME = "Value");

And the caller looks like

Class RMH.SOAP.SoapTreeSoap Extends %SOAP.WebClient [ ProcedureBlock ] {
...
Method Run...(Tree As %String, Inputs As %String, Debug As %Integer) As RMH.SOAP.s0.Output 
3
1 621
Question Michael Gosselin · May 14, 2020

So, I was doing a debug test on a routine, and tried to open a file (yes, it does exist) as so:

file=##class(%File).%Open($$$airfile,"R")

And, I got the above-mentioned error. It begins with "cn_iptcp://localhost:56775/%Stream.Object.1.INT" in case the port means anything.

This is a single-license version of Cache 2017.2, which I installed about three years ago. You would think I'd have the .INT files, but I don't. Oh, one other oddity: I can't seem to compile the routine, despite having admin privs for the machine. It's Windows 7 64-bit.

Any help is appreciated.

2
0 472
Announcement Rob Tweed · May 15, 2020

I've created a new repository that I will use for providing examples of various scenarios and use cases for QEWD

https://github.com/robtweed/qewd-microservices-examples

Initially it contains a example of a scenario I'm often asked about: a set of REST APIs, with JWT support, implemented as a set of QEWD MicroServices, each of which uses Cache or IRIS running on a Windows system.

What I've provided is a detailed, step-by-step guide (with detailed explanations) of how to set up such a system.

The example shows a use case of REST APIs to:

- authenticate / login

0
1 502
Question Jo Ellen Laansma · May 13, 2020

I have a class that writes to an external SQL Server database.  When the field is empty, it does not write the column and the column has the value NULL.  In some cases, I want the column to be the value of the empty stringinstead of NULL.

Class myRequestClass Extends Ens.Request
{

    Property MessageType As %String

}

The message that is passed to this class shows:

    <MessageType></MessageType>

Which writes the field as NULL with:

    tSQL = "insert into myTable (MessageType) values (?)"

    set tSC = ..Adapter.ExecuteUpdate(.tNumberOfRowsUpdated,tSQL,myRequestClass.MessageType)

5
0 16781
Question Arto Alatalo · Apr 15, 2020

If two globals have same structure, how to reuse one CacheSQLStorage-based class to read both locations?

Thanks!

Update:

Let's say we have two globals:

^a(1)="dataa1"
^a(2)="dataa2"

and

^b(1)="datab1"
^b(2)="datab2"

i.e. the structure difference is global name only.

I would like to have two classes TableA and TableB both are inherited from TableAB, and TableAB taking global name as a parameter.

14
0 772
Question Curtis Walter · May 9, 2020

Howdy everyone,
I am not a Cache Pro... Just an old hack with an idea to try to help my client.

We are running a medium sized salvage yard with Car-Part's Checkmate vehicle inventory software running Cache. Our part lookups sometimes run 10 seconds or more.

2
0 499
Question Christopher Kennedy · May 8, 2020

I am importing scriptlink wsdl in the form designer.  I get the following error: 

Error Importing WSDL.  Please validate WSDL address.  ERROR #6301: SAX XML Parser Error attribute value expected while processing Annonymous Stream at line 28 offset 73.

Please advise. 

Thank you, 

Chris Kennedy

5
0 482
Question Yone Moreno · May 11, 2020

Hello,

We would like to know if Ensemble could generate a CADES sign from a string and a certificate.

We have read:

https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GXM…

So we have seen that we could create a class, to sign a document, and store the sign inside that new class. We have also seen that there are some different algorithms to choose from, like sha1.

In addition we have also consulted the CADES sign definition:

https://tools.ietf.org/html/rfc5126

The use case is to avoid being dependant of an external web service, and be able to generate it.

1
0 224
Question lw wei · May 6, 2020

My steps are as follows:

1. Switch to the system user using psTool

2. Start instance in emergency way 

3. Journal restore

4. Stop instance

A dialog box appears:

The parameter “quielty” seems to have no effect in the windows environment

Is there any non-interactive way to close the instance?

10
0 527
Question Paul Beckett · Jun 16, 2016

Hi,

I have a bit of code that does a find and replace on a "template" and inserts additional content. For example it replaces the @DATA@ with an html table:

<html>

   <body>

      <div id="data">@DATA@</div>

   </body>

</html>

Currently doing this with the $replace function:

Set text=$replace(text, "@DATA@", data)

The problem is the "data" is now too big for a %String (yes even with large strings) so will switch to use a stream instead. 

5
0 1832
Question Russell Carpio · May 7, 2020

We are getting CoClass not available [80040111] when using %Net.SSH.Session.  Does anyone know if there is a security setting that would disable this object?

Any help would be greatly appreciated.

3
0 368
Question Stuart Byrne · Mar 10, 2020

Dear All,

I'm looping through a list with characters (Parenthesis, square brackets etc) and I wish to remove these from the list.

The for loop and IF logic are effectively removing these items from a list.

However the variable I use for the maximum number of loops carries on beyond the number of items of the list after removal.

In the output value for these I get the integer of the for loop instead of a  null for the empty list fields.

I can see in the documentation that the end variable is not editable once the loop is started.

12
0 824
Announcement Ken Earl · May 5, 2020

I have just started to experiment with Using IRIS in Docker.

My first objective was to be able to enable global persistence within a Docker container. Using the following command I have managed to achieve this:

docker run --detach --publish 52773:52773 --volume /data/dur:/dur --env ISC_DATA_DIRECTORY=/dur/iconfig --name iris21 store/intersystems/iris-community:2020.1.0.199.0

Within this container, I have created a simple global:

for i=1:1:10 set ^tmp(i)=""

I then stopped and removed the container. On reloading and restarting the container the global has persisted.

7
0 441
Question Arto Alatalo · May 5, 2020

Every time I click Save on  System > Configuration > Memory and Startup page, I get "ERROR #5005: Cannot open file '/var/cache/cache.cpf_XXX' " error message, where XXX is a random number. This problem appeared some time ago without any clear reason. All file access right are seems OK.

Any ideas?

3
0 932
Question Thembelani Mlalazi · Nov 14, 2017

I am using studio 2015 version which does not have dynamic objects and I need to read xml and convert that to a json I have managed to come close to json string but with little difficulties .I need to be able to identify the root element and specify where to put braces between objects  anyone  with any idea is welcome he is my code so far

12
0 1709
Question Arto Alatalo · May 5, 2020

(We are in contact with IS support for this problem but I would like to ask Community too, perhaps somebody experienced this problem in the past)

Hello Community,

we need your help with Cache 2017.2 freezing on Linux machine.

Since we moved our primary production Cache from Windows to Linux in the begging of this year, we have experienced system freezing twice. Yesterday without any good reason Cache stopped to respond with the log shown below.

Questions:

  • Any idea what could cause WRTDMN freezing?
  • What actions it makes sense to take in order to have enough info when the system freezes next time.
5
0 1120