#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

New
Question Carl Deitrich · Feb 17

We are attempting to "Repoint" old class data to new class data to save disk space and data redundancy across multiple tables. This works to a point.  In essence the two classes are sharing the same data / Index / stream globals.  But if an ID in the Old_Class is opened, a property is modified, and saved the property that is in the New_Class (but not in the Old_Class) is NULLed / blanked.

Simplified explanation of data and what’s occurring.

Old Class Values   New Class Values
First_Name John   First_Name John
Middle_Initial Q   Middle_Initial Q
Last_Name P
10
0 81
Question Yone Moreno · Jun 21, 2021

Hello,

First of all thanks for your time reading our question, and thanks for your replies and help

We would need to know if a patient has less than 65 years old, using their birthday from the PID 7.1

So far we have developed the following code:

 //19760422 
  set nacimiento             = request.GetValueAt("PID:DateTimeofBirth.Time")
  $$$LOGINFO("nacimiento: "_nacimiento)


  //22/04/1976
  set nacimientoFormateado   = ##class(Util.FuncionesComunes).DateFormatConvertToXML(nacimiento)


  // ""
  set nacimientoFormateado65 = $extract($system.SQL.DATEADD("yy",65,nacimien

4
0 400
Question Soufiane Amroun · Nov 14, 2017

Hi communauty

I've two columns in my table and the type must be interval of integer values for example : age must be interval between [2 and 6] years and wigth between [10 and 30 ] Kg , how can i define them when creating my table?

thank's

3
0 312
Article Kurro Lopez · Feb 21, 2018 1m read

Hi all,

I've created a method to calculate the age of a person, or the age of a process, contract or other stuff as you want.

/// Calculate the age from date of birth and other date (by default shoud be today).
/// <b>dateOfBird</b> Date of birth in cache format. ie. $ZDH("1972-01-01",3)
/// <b>day</b> Date to calculate to. ie: $H
ClassMethod AgeAt(dateOfBirth, day) As %Integer{
    quit:dateOfBirth=""
    quit:day=""
    
    set yeardob=$SYSTEM.SQL.DATEPART("year",dateOfBirth)
    set yearday=$SYSTEM.SQL.DATEPART("year",day)
    
    set years=yearday-yeardob
    kill yeardob,
2
0 1888
Question Jainam Shah · Feb 7

Hello Team,

I am trying to duplicate the production flow in the Ensemble 2018 but after doing all the steps (like copying same class file, adapter file, process class file) as production, still the flow is not working. The error is that it is not reaching the operation (which is supposed to store the data), it gets stuck in the processes. Additionally, I am also trying to add a logic where in OUL message if the value of code 20061 > 30mg, it should automatically send another order back to service (OML). So the flow will be, Device -> Service->Processes->Operation(DB Store)->Process(ACK and di

2
0 50
Question Lynton Blair · Feb 9

in C++ program with #include iris-callin.h..  The program terminateswhen it tries to execute IRISSECURESTARTA with exit code -1073741515.

const char *username="user", *password="xyz",*exename="Test_Callin";
int termflag = IRIS_PROGMODE|IRIS_TTNONE|IRIS_TTNEVER;

rc = IRISSECURESTARTA(&pusername, &ppassword, &pexename, termflag, timeout, NULL, NULL);

Note: the %Service_Callin setting is Enabled.

»  
10
0 69
Question Hour Abdellatif · Jan 26

Hello everyone,

My team lead mentioned that users can sometimes create globals directly without associating them with tables or classes. In this case, these globals would not be accessible via SQL.

Is this correct? Can a global exist independently in this way, and if so, is there a specific approach to access or manage them without SQL?

9
0 134
Question Jainam Shah · Jan 25

I've modified the class file, but messages still arrive as a single line (e.g., "H|.../rQ|.../rL") instead of separate lines in the ASTM service. The <ENQ>..<EOT> header looks correct, logs show no errors, and the service receives messages fine. Is there an Ensemble 2018.1 engine setting (like line terminator handling or TCP framing) to fix the line splitting? ​

4
0 72
Question Hour Abdellatif · Jan 27

Hello Community,

I am facing a JDBC connection issue after migrating from Caché 2016 to Caché 2018.1. When I attempt to connect using the following connection settings:

CACHE_DATASOURCE_URL=jdbc:Cache://localhost:1972/TEST

CACHE_DB_USERNAME=test

CACHE_DB_PASSWORD=test
 

I consistently receive the following error:

[Cache JDBC] Communication link failure: Access Denied

This configuration worked perfectly with Caché 2016. I have verified the following:

  1. The namespace (TEST) exists and is correctly specified in the connection URL.
  2. The credentials (username: test, password: test) are c
7
1 86
Question Fernando Zañartu · Mar 3, 2021

Where can I download the Cache ODBC drivers?

Where can I download the Cache ODBC drivers for Windows?

I need to connect to a cache database by odbc but the FPTs that I have found do not work, 
could you tell me where to download the ODBC drivers

16
0 10850
Job Tricia Scanlon · Jan 19

We are hiring!  100% Remote W2 Contract | 3-6+ Months (numerous extensions likely)

Two Roles:
🔹InterSystems Engineer
🔹Epic Bridges Certified/InterSystems Engineer  

Having solid experience with the below: 

  • Interface Development: Building and configuring message routes, business processes, and transformations using components like IRIS, Ensemble, or HealthShare.
  • Interoperability Standards: Implementing and supporting workflows for healthcare standards including HL7 (v2/v3), FHIR, etc.
  • System Integration: Connecting disparate health information systems to EMR like Epic Bridges, clinical app
0
0 85
Question Victor Paredes · Jan 7

Hello,

We are accessing an InterSystems Cacha database from Microsoft SQL Server using a linked server over ODBC (ODBC35). Queries are executed using OPENQUERY.

On the SQL Server side, there is a linked server property called Query Timeout. By default it is set to 0 (no timeout). We are considering setting it to 15 seconds and would like to understand how Cache behaves in this scenario.

Specifically, I would like clarification on the following points:

  1. When SQL Server sets a query timeout (for example, 15 seconds), is this timeout visible to or enforced by Cache itself, or is it handled
6
0 109
Question Ruslan K · Dec 4, 2025

Hello. Here is  XDataReportDefinition

/// XML that defines the contents of this report.
XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition]
{
<report xmlns="http://www.intersystems.com/zen/report/definitionname='bills' runonce="true">
<attribute name='runTime' expression='$ZDT($H,3)/>
    <attribute name='runBy' expression='..GetUserName()/>
    <attribute name='author' expression='..ReportAuthor'/>
<group name='bills' OnCreateResultSet="CreateRS">
<parameter name="MonthDt" expression="..Month"/>
<parameter name="Company" expression="..Company"/>
<para

1
0 65
Question Ruslan K · Jan 8

Hello
How to hide a table completely in pdf generation when a row is empty?
A table has style with borders
<table group="services" removeEmpty="1" style="border:1px solid black;">
     <item field="TotalSum" suppressEmpty="1" />

     <item field="TotalAvSum" suppressEmpty="1" />
 </table>
With 
removeEmpty="1" and  suppressEmpty="1"  all data are hidden when a row is empty but top and bottom borders are remain on the page.
How to hide also table's top and bottom borders when a data row is empty?

3
0 66
Article Jinyao · Feb 21, 2025 4m read

Motivation

I didn't know about ObjectScript until I started my new job. Objectscript isn't actually a young programming language. Compared to C++, Java and Python, the community isn't as active, but we're keen to make this place more vibrant, aren't we?

I've noticed that some of my colleagues are finding it tricky to get their heads around the class relationships in these huge projects. There aren't any easy-to-use modern class diagram tool for ObjectScript.

Related Work

I have tried relavant works:

- InterSystems class view:
1. https://github.com/intersystems-community/ClassExplorer
Thi







Generate InterSystems ObjectScript Class Diagram




12
5 666
Article Thibault Odor · Dec 29, 2025 3m read

You probably know this situation:
Some time ago, you found a very special $ZU function for a very specific type of problem. Some kind of mystical formula. It became popular and was used by many developers throughout your code and across all your installations.

Several versions and updates later, you are informed by ISC that your mystical $ZU is deprecated and no longer supported. You are advised to replace it with a new $something().

So, how do you find and document the usage of this mysterious code?
It might be located in classes, in MAC, INT, or INC code.
It can also be spread across multiple








2
0 109
Article Tani Frankel · Dec 24, 2025 2m read

You send an HTTP request and get back an HTTP error but with an HTML error page which you didn't expect... what's happening?... 🤔

Specifically for example, perhaps you tried to READ a FHIR Resource (e.g. /Patient/123) and you get back a 404 error page, even though with other Patient IDs, you get back the Resource payload, so "the page" definitely does exist... why should you be getting a 404 error page? 🙄

0
0 110
Article Vachan C Rannore · Oct 21, 2025 3m read

Hello!!!

Data migration often sounds like a simple "move data from A to B task" until you actually do it. In reality, it is a complex process that blends planning, validation, testing, and technical precision.

Over several projects where I handled data migration into a HIS which runs on IRIS (TrakCare), I realized that success comes from a mix of discipline and automation.

Here are a few points which I want to highlight.

1. Start with a Defined Data Format.

Before you even open your first file, make sure everyone, especially data providers, clearly understands the exact data format you expect. Defining templates early avoids unnecessary bank-and-forth and rework later. 

While Excel or CSV formats are common, I personally feel using a tab-delimited text file (.txt) for data upload is best. It's lightweight, consistent, and avoids issues with commas inside text fields. 

PatID   DOB Gender  AdmDate
10001   2000-01-02  M   2025-10-01
10002   1998-01-05  F   2025-10-05
10005   1980-08-23  M   2025-10-15

Make sure that the date formats given in the file is correct and constant throughout the file because all these files are usually converted from an Excel file and an Basic excel user might make mistakes while giving you the date formats wrong. Wrong date formats can irritate you while converting into horolog.

12
2 225
Article Karthickraja S · Dec 18, 2025 2m read

The Power of Indexing in Database Tables

When working with databases, most developers understand the concept of an index and why it's used: to speed up data retrieval. But the real impact of indexing often becomes clear only when you compare scenarios with and without it.

Do you Know what Happens Without an Index?
Imagine a table with three columns: Name, Age, and MobileNumber.


Now, consider this query:

If the Age column does not have an index, the database engine will:

  • Check if the WHERE condition field has an index.
  • If not, it will scan the entire table (a full table scan).
  • For eac





3
2 112
Question Alan Nguyen · Dec 10, 2025

Hi,

I have Cache 2024.1.  I attached the process ID from my terminal to the Cache Studio for Debugger.  When I click on  "Call Stack" tab I only see first 500 shown.  Anyone know how to extend so I can see the rest of the information when i click on "Call Stack" tab?  Thank you very much.

Second question:  Using Cache Studio Debugger, anyone know how to expand the value of this variable when it display F,...

3
0 86
Article Megumi Kakechi · Dec 18, 2025 1m read

InterSystems FAQ rubric

If you try to kill a global that is mapped at the subscript level from the top node, you will get a <SLMSPAN> error and it will not be deleted. This is because the kill command for subscript-level mapped globals cannot be used across mappings.

// Suppose subscript-mapped globals exist in different databases, as shown below:^TEST(A*~K*) -> database A
^TEST(L*~Z*) -> database B

// Trying to kill from the top level will result in a <SLMSPAN> error.
NAMESPACE>Kill^TEST
<SLMSPAN> <- This error is output.

To delete only the global in the current namespace (databas

enlightened

0
0 75
Question Matthew Cummings · Oct 14, 2021

Hello all,

First time post and newer to Cache/ObjectScript in general, please keep it in mind! 

Some background: I need to build part of a production whose goal is to send patients emails based on appointment status as a daemon-based approach. I have to use Microsoft Graph to accomplish this, which you need an access token to use. To get the access token, I have to go through the OAuth2.0 client credentials grant flow, which involves the creation of a signed JWT assertion using the RS256 algorithm.  
I was looking at the %OAuth2.JWT class to accomplish this, via its ObjectToJWT() method. My q

10
1 1534
Article Hiroshi Sato · May 16, 2024 1m read

InterSystems FAQ rubric

Too run SQL in Terminal use $system.SQL.Shell().

Please refer to the sample below.

SAMPLES>do $System.SQL.Shell()
SQL Command Line Shell
---------------------------------------------------- The command prefix is currently set to: <>.
Enter q to quit, ? for help.
SAMPLES>>select * from Sample.Vendor
1. select * from Sample.Vendor Vendor Balance Contact DaysClear DiscDays DiscRate LastInvDate LastPayDate MinPayment Name NetDays PayFlag TaxReportingAddress_City Address_State Address_Street Address_Zip
: *If you press Enter without entering anything on the first line, it will
6
0 579
Question Matheus Augusto · Nov 25, 2025

In some cases, it's necessary to manipulate data from one namespace to another. For example, a routine in the "N1" namespace needs data from the "N2" namespace. In legacy systems (using only globals), it's common to make the global universal, but what about persistent classes? Is this type of globalization also possible?

In the same context, how could I make a persistent class global for all namespaces? The only way I know is by putting it in %SYS. For example, to build a class from the "N1" namespace in the "N2" namespace, I need to use the pipe or the ZN function, but this somewhat reduces

7
0 121
Question Matheus Augusto · Dec 4, 2025

Recently, we implemented some Java-based services using JDBC. And some time ago, I refactored some legacy PHP programs that used "csession" for communication between systems to use PDO with ODBC.

This raised a question for me about how license management is done in this scenario.
Is a license used per pool? Or per connection? How is this management done?

0
0 71
Article Timothy Leavitt · Jan 15, 2020 9m read

Introduction and Motivation

A unit of ObjectScript code (a ClassMethod, say) may produce a variety of unexpected side effects by interacting with parts of the system outside of its own scope and not properly cleaning up. As a non-exhaustive list, these include:

  • Transactions
  • Locks
  • I/O devices
  • SQL cursors
  • System flags and settings
  • $Namespace
  • Temporary files

Use of these important language features without proper cleanup and defensive coding can lead to an application that normally works correctly, but that may fail in unexpected and difficult-to-debug ways. It is critical for cleanu

8
6 1663
Article Andreas Schneider · Apr 22, 2025 4m read

When using standard SQL or the object layer in InterSystems IRIS, metadata consistency is usually maintained through built-in validation and type enforcement. However, legacy systems that bypass these layers—directly accessing globals—can introduce subtle and serious inconsistencies.

Understanding how drivers behave in these edge cases is crucial for diagnosing legacy data issues and ensuring application reliability.
The DATATYPE_SAMPLE database is designed to help analyze error scenarios where column values do not conform to the data types or constraints defined in the metadata. The goal is t











3
0 230