#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Question Gabriel Silva dos Santos · Jan 17, 2025

Hello everyone,

I’m facing issues with replicating data from my Caché 2016 database to a PostgreSQL database. I need to handle around 300 data updates per minute, and whenever certain tables are modified, those changes must be reflected in other databases.

So far, I’ve tried various approaches, including:

  • Setting up an intermediary API,
  • Using Azure Service Bus,
  • Leveraging Caché Jobs,
  • All of which rely on table triggers as the entry point.
6
0 155
Question Oliver Wilms · Jan 19, 2025

I inherited some legacy MUMPS / ObjectScript code. A code review identified an exclusive NEW and that is not allowed per our coding standards.

The original code contains:

RUN(CALL,DRVNAME)
 S $EC=""
 S ^TMP($J,"RMPV","DRVNAME")=DRVNAME
 N TMPFILE,OLDIO
 S OLDIO=$IO
 I $G(^TMP("RMPV","SILENT"),1) S IOP="NULL",%ZIS=0 D ^%ZIS I '$G(POP,1) U IO
 D INIT^@DRVNAME
 D  ; scope variables
 .N (DUZ,CALL) ; Protect %response
 .S IOF="""""",IOM=80,U="^"
 .D @CALL
 U OLDIO
 Q

I attempted to replace Exclusive NEW with a ClassMethod in a procedure block as follows:

3
0 127
Question Ali Chaib · Jan 9, 2025

Everytime I try to send a POST FHIR bundle I'm getting the following response: 404 Not Found. I'm not really sure why, although it works fine with a GET!

This is an example: 

 Response:

It might be something related to request path but not really sure.

And this is the HTTP service I'm using 

I tried this with Postman and it's working as expected

Am I missing something ? 

1
0 125
Question Hugh Hamilton · Nov 16, 2023

We have a service account that is running queries to pull some data.  It has read only access to the tables, but, unfortunately, the tool is starting a transaction before it reads the database.  The query takes more than 20 minutes (21 - 23 minutes), so we're getting the console message that the transaction is open longer than 20 mins.  Is there a way to prevent a user/service account from being able to start a transaction since it only has read access to all of the tables in the database?

12
0 623
Question Marc Mundt · Jun 21, 2016

A customer is using Caché online backups and needs to automatically purge the cbk files with a scheduled task.

This is a wheel has been reinvented uncountable times already and I know somebody out there has a well written, extremely robust version that has already stood the test of time.

Does anyone have a nice routine/class/task for purging old Caché backup files? 

11
1 1759
Question omer · Jan 12, 2025

Hello, 
In short, I am trying to get the Content-Length of my response, 

We have a CSP application, when we get a new request we begin to process it, throughout the app we WRITE to the response in different places, 
now when the response is about to be sent back to the client - we would like to know its Content-Length (in the RESPONSE HEADERS). 
So it comes down to two questions:
1. How can we access the Content-Length of our response?

2. In case we CAN'T - Where in the broker.cls/page/base classes can I observe the moment we actually write the response itself and attach its headers?
Thank you!

1
0 124
Question Lee Butcher · Dec 3, 2024

I'm attempting to build a fairly complicated object graph, with nested objects and collections, in order to create a FHIR bundle.

In its most basic form there is a <bundle></bundle> element that represents the root, and there can be a number of nested <entry></entry> child elements.

I'm attempting to represent this as such:

class Bundle (%RegisteredObject, %XML.Adaptor)
{
    Property Entries As List Of Entry;
}
8
0 202
Question LI LINFENG · Jan 6, 2025

I have installed three plugins on VS Code: Intersystems Language Server: v2.3.6, Intersystems ObjectScript: v2.10.5, and Intersystems Server Manager: v3.6.2. I connected to the Caché database and connected a workspace to the InterSystems server. Then I edited the code locally on my client machine. However, only modifying the code and adding new code files allow for automatic updates on the server after executing "import without compilation." Deleting code files does not achieve this; I need to return to Explorer to delete them, and then the code files can only be truly deleted on the server side through Studios.

6
0 190
Question Dan Murt · Jan 3, 2025

Hi Community,

I have a CSP page I am developing with the intent of pulling files from an SFTP site and placing them in a folder on the local network.

I am having an issue where the CSP page is catching a JS error. The error in the browser is - A JavaScript exception was caught during execution of HyperEvent: SyntaxError: Unexpected identifier 'downloading'. (However, the unexpected identifier changes after refreshing page, or after removing the Write statement with the work 'downloading' in it.)

I think I have narrowed it down to a piece of the Javascript code - 

9
0 228
Article Robert Cemper · Dec 22, 2024 3m read

I recently met an ages old issue related to code maintenance:

  • You have access to your IRIS server just over ODBC/JDBC
  • no VSCode access, no Studio access
  • no (Web-)Terminal access

But you need to take a look on Classes or Routines or Globals !!
Anyhow SQL is your friend.

  • First you need a simple table as temporary text store.
CREATEGLOBALTEMPORARYTABLE  arcc.txt (line VARCHAR(32000))

Not a thrilling action.

  • Next you export your code to local file and import it to your table
7
9 357
Article Mark OReilly · Dec 13, 2024 5m read

As part of the Open Exchange competition Salford Royal (Dean White and Mark O'Reilly) developed a REST API for sharepoint as a template that works but can also be a starting point to your own Rest Applications 

Prerequisites

This is using the v1 REST sharepoint API you need a tennant id, client id, client secret and tennant name 

Setup 

Configure an OAuth server

 

The code in the middle is the tennant ID 

Create a client config name as whatever you want 

Set up the oauth client replacing your server ip with the ip of the server you are on (not the VIP address- if not part of a VIP localhost may work) 

2
0 273
Question Ali Chaib · Dec 19, 2024

Every time I try to update an SQL table using odbc connection, I'm getting: ERROR <Ens>ErrException: <MAX $ZF STRING>zPrepareW+1^%Library.SQLGatewayConnection.1

Set sqlStatement = "UPDATE dbo.Table1 SET OriginalMessageText="_OriginalMessageText_"WHERE Id='"_Id_"'"
$$$TRACE("SQL Statement: "_sqlStatement)

I know that the problem is with the length of the ORU HL7 message  (that contains OBX base64 PDF file ) I'm trying to update in the table, but is there a way to fix this? other than truncating the message ?

I also tried this statement but it didn't work as well

0
0 94
Job Vanshika Tiwari · Dec 18, 2024

Please note- the resource should have expertise working in CCDA/FHIR implementation along with IRIS development experience.

IRIS for Health CCDA/FHIR IRIS developer 

  1. Hard Core IRIS for Health Engineers who have experience working on IRIS for Health 
  2.  CCD/FHIR and conversion services using SDA and DTL model (at least one production implementation of Conversion services to FHIR)
  3. Have Good knowledge of GCP and GKE’s (IKO’s deployed on GKE environment or any K8 cluster)
  4. Fine tune and debug IRIS Productions, assist L2 ops team when required
  5. CICD/GIT knowledge
0
0 142
Question Alin Soare · Dec 13, 2024

Hi,

My variable `check1` is a string.  It is either the empty string (for invalid/false answer) or a non-empty string for a valid/true input.  If it is valid, I want to return it.  I wrote this code:

ret:$l(check1) check1

I do not like it once because it repeats the variable, but the main reason I do not like it is that if I do not insert the check $length(string) it will return false even for non-empty strings (due to conversion to integers for string prefixes).

I would like to ask you whether is there some nicer form in mumps to check for the non-empty strings than checking their length.

3
0 300
Question Greg Moua · Dec 12, 2024

Hi all,

I am trying to establish an HTTPS connection to a server using a %Net.HttpRequest object. I'm able to ping and curl the server via command line. The issue I am running into is that I am able to establish a connection, but something seems to be going wrong with verification from the server side. For example, if I use the CheckSSLCN method on the server, it returns this error message 

ERROR #6155: Unable to verify SSL/TLS connected to correct system as no SSL certificate present for this socket. */

However, if I go ahead and try to post something to the server I get this error message:

2
1 270
Question Vinicius Viana · May 28, 2024

Hi everybody,

I need to connect a Caché database to Metabase, but Metabase does not support this database.
Metabase only supports these databases:

- Amazon Athena
- BigQuery (Google Cloud Platform)
- Druid
- MongoDB (recommend version 4.2 or higher)
- MySQL (recommend version 8.0.33 or higher, as well as MariaDB version 10.4 or higher)
- Oracle
- PostgreSQL
- Presto
- Redshift (Amazon Web Services)
- Snowflake
- SparkSQL
- SQL Server
- SQLite
- Vertica

3
0 245
Question Lee Butcher · Nov 28, 2024

I'm trying to project a series of objects and nested objects to XML, and I'm having difficulties getting the XML representation exactly the way I need it to be. Here's what I'm working with, nothing complicated:

Class XMLTest Extends (%RegisteredObject, %XML.Adaptor)
{
    Property Id As Id;
}

Class Id Extends (%RegisteredObject, %XML.Adaptor)
{
    Property Value As%String (XMLPROJECTION = "attribute");
}

By default it seem closing tags are used with all elements, as such:

<XMLTest><IdValue="D1949EE1-7D03-4666-9548-D1A949E10327"></Id></XMLTest>
5
1 205
Article Megumi Kakechi · Nov 7, 2024 1m read

InterSystems FAQ rubric

It can be obtained with a List query of the %SYS.Namespace class.

1. Create a routine like this:

getnsp
   set statement=##class(%SQL.Statement).%New()
   set status=statement.%PrepareClassQuery("%SYS.Namespace","List")
   set resultset=statement.%Execute()
   while resultset.%Next() {
       write resultset.%Get("Nsp"),!
   }
   quit

2. Run it in your terminal

USER>do ^getnsp
%SYS
DOCBOOK
SAMPLES
USER

The method of executing class queries introduced in this article can be applied in a variety of cases.

4
1 488
Question omer · Nov 24, 2024

I am working on a product that uses REGEX and matches it. 
The regex is tested both on the client-side (using the JavaScript REGEX engine) and both on the server-side.
But I couldn't find one word about the way intersystems parses the regex, It is quite elementary to state which which engine it works with. 
from what I could gather from early implementations and such, the engine is based off PCRE, But I need to confirm this somehow, Can anyone give me a definitive answer, Is there any tool to test the regex other than writing it myself??
 

2
0 185
Question Eduard Lebedyuk · Jun 3, 2016

Let's say I open a stream/file.

If it's not in UTF8 i need to call $ZCVT, and if it's already in UTF8, then I don't need to call $ZCVT.

Is there any way to determine character encoding for input stream/file?

8
0 2387
Question Davi Massaru Teixeira Muta · Nov 21, 2024

Is it possible to check retroactive LOCK history?
 

context:

I found it in the application error log. Some LOCK errors - ERROR #5803
Is it possible to somehow identify the point in the job or process code that caused these locks?

At the moment I no longer have table LOCKS on the server, but I would like, if possible, to check the time at which the incidents occurred.

1
0 150
Question Matthew Mifsud · Nov 20, 2024

Hi, 

When I try to compile a specific class it fails and gives the below error message.
ERROR #5002: Cache error: <FUNCTION>zLockUse+5^%ExtentMgr.GlobalRegistry.1
  > ERROR #5030: An error occurred while compiling class 'ClassNameHere'
Is there anything I can do to fix this issue?
Thank you in advance for your response.

0
0 96