#Caché

30 Followers · 4.6K Posts

  

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

Documentation.

Question Scott Roth · Mar 28, 2023

I am trying to pinpoint and troubleshoot an issue we have been seeing lately. We have several SQL Outbound Adapter Operations that are seeing issues trying to connect to our MS SQL Servers using the JDBC Gateway for calling insert, select, update, and stored procedure calls.

ERROR <Ens>ErrFailureTimeout: FailureTimeout of 20 seconds exceeded in osuwmc.Visit.

0
0 380
Article Hiroshi Sato · Mar 23, 2023 1m read

InterSystems FAQ rubric

You can programmatically retrieve routine dates and sizes using the RoutineList query of the %Library.Routine (or just %Routine) class.

The RoutineList query has an argument, and the routine name to be searched can be specified by prefix match or middle match. (For wildcards, specify * or ?)

In the example below, *.MAC is specified as an argument.

 SET tStatement =  ##class(%SQL.Statement).%New()
 DO tStatement.%PrepareClassQuery("%Routine" , "RoutineList") 
 SET rs = tStatement.%Execute("*.MAC",,0) 
 DO rs.
2
0 705
Article Julian Matthews · Mar 17, 2023 7m read

Introduction

Say you have a receiving system that accepts HL7 and provides error messages in field ERR:3.9 in the ACK it returns. You require a different reply code action depending on the error message, however the Reply Code Actions settings for the operation do not provide this level of granularity. One option could be to create a process that takes the ACK and then completes the action you were expecting, however things can get a bit messy if the action is to retry the message, especially when trying to view a message trace.

2
1 923
Article Peter Steiwer · Jan 17, 2020 1m read

If you are seeing this error during import: ERROR #6301 Line: 2 Offset: 118 This does not appear to be a Cache exported file, unable to import.

This error is caused by exporting from InterSystems IRIS and trying to import into Caché. If you plan on exporting from IRIS to Caché, you can use the following qualifier to export your classes so that Caché does not throw an error on import:

w $SYSTEM.OBJ.Export(<items>,<filename>,"/exportversion=cache2018.1")

Please see the Documentation for more information about this Export Qualifier

3
0 946
InterSystems Official Jeff Fried · Mar 23, 2023

InterSystems is committed to providing high quality product support to customers for all products, new and old.   As products age – Caché is now 25 – that support will evolve.

InterSystems IRIS was released in 2018 and it is the successor to Caché and Ensemble.  Many Caché/Ensemble customers have migrated to IRIS or have plans to do so in the next few years.  Customers continuing to use Caché or Ensemble should be aware of the following important announcement:

Caché/Ensemble maintenance releases will continue for the next 4 years - through Q1 of 2027.

0
1 1432
Question Smythe Smythee · Mar 23, 2023

Hi Community,

I am trying to save data into SQL table but each entry  getting saved twice in the SQL table. Is there any reason data is saving Twice in the SQL table 

I have created a %Persistent class for the fields

Please find the business operation below

Class Patient.DBOperation Extends Ens.BusinessOperation

{

Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";

Property Adapter As EnsLib.SQL.OutboundAdapter;

Parameter INVOCATION = "Queue";

Method OnMessage(pInput As Patient.PatientDBReq, pOutput As Ens.Response) As %Status
{
    Set Entry=##class(Patient.PatientDBReq).%New()
    Set Entry.

6
0 401
Article water huang · Mar 19, 2023 9m read

1.Background

        1.1 I met a few project that their interface servers were crashed. Cutoms wanted resume server as fast as we can. their servers are running at lan,and they can't use git,there are some namesapce in the server running different service,and usualy there is only one server.

        1.2 In the message,it has property in typeof characterstream,as you know,the message search page doesn't support filtering with  property of characterstream,so it's so hard to find the messge you want.

        1.3 Other workmate may update the code on the server,and mybe their is something wrong.

2.

11
2 740
Article Eduard Lebedyuk · Mar 1, 2017 17m read

The task of handling office documents, namely docx documents, xlsx tables and pptx presentations is quite complicated. This article offers a way to parse, create and edit documents using only XSLT and ZIP.

Why? docx is the most popular document format, so the ability to generate and parse this format would always can be useful. The solution in a form of a ready-made library, can be problematic for several reasons:

  • library may not exist
  • you do not need another black box in your project
  • library restrictions : platforms, features, etc.
  • licensing
  • processing speed

In this article, I would use only basic tools for work with the docx documents.

3
1 6940
Article Daniel Aguilar · Mar 18, 2023 3m read

One of the reasons why I love Cache and Iris is that not only you can do anything you can imagine, also you can do it in a lot of different ways!!.

Imagine that you have an integration running with IRIS connected by ODBC you probably only run SQL queries but you can also create stored procedures and inside write the code to do everything you can imagine.

I'm going to give you some examples but the limit is your imagination!!

You might wonder, wait! I don't know how to create a store procedure in IRIS.

1
2 563
Question Edoeard Kroetkov · Mar 17, 2023

Goodday,

I would like to Validate token signature with public key i have in pem format, i am using below  code but i get error message. Could you please tell me what i am doing not right? FOUT #5002: Caché fout : <DIRECTORY>zLinkToFile+2^%Stream.FileBinary.1 *-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMI ...

hier is my code

Method ValidateTokenWithPublicKey(jwt As %String) As %String
{
   
     Set tFile=##Class(%File).%New("c:\Kety\publicKey.pem")
    Do tFile.Close()
    Set tStatus=tFile.Open("RU")
    $$$ThrowOnError(tStatus)
    Set tPublicKey=tFile.Read()

1
0 288
InterSystems Official Fabiano Sanches · Mar 6, 2023

InterSystems announces the Maintenance Release (MR) of Caché, Ensemble and HSAP 2018.1.8. This is a maintenance release with many updates across a wide variety of areas.

Caché and Ensemble

Full product installation kits can be downloaded from the WRC Software Distribution website:

For information about the corrections in this release, refer to the Release Changes Notes. The documentation for Caché and Ensemble includes these as well as the Supported Platforms document, the Class Reference, and a full set of guides, references, tutorials, and articles.

1
0 482
InterSystems Official Steve Brunner · Oct 7, 2016

InterSystems is happy to announce the availability of our newest Data Platforms release: Caché and Ensemble 2016.2

The highlights of 2016.2 are:

  • Server support for Atelier, the new Eclipse-based IDE
  • Support for OAuth 2.0 and OpenID Connect
  • SQL syntax has been enriched with support for JSON
  • SQL improvements and performance enhancements

For complete technical details of what’s changed in 2016.2, review the Caché release notes and the Ensemble release notes.  Additional materials have been posted to the InterSystems Developer Community

8
0 2846
Question Mark Charlton · Feb 17, 2023

I know this problem something to do with sort and collation and string comparison vs numeric only strings, but I can't fathom out the details of it. 

I have the following global, where all values are suffixed with a space, I believe the intention is to prevent empty strings and force string comparisons rather than numeric. Which is fine when searching for an exact match, so searching for "ABC" internally looks for "ABC ", or "800999" looks for "800999 ". However one function tries to search for strings containing, (specifically beginning with), a partial code.

12
0 536
Question Edrian Golob · Mar 9, 2023

Hey guys.

I'm having trouble using the Certificate in my BO.
It started to occur after updating the certificate.

I have 2 configurations and 2 certificates, the first one was updated and no error occurs, the second one, the  bad certificate or Handshake failure errors occurs. Both have the same configuration.
I already tried marking SSLV3, handshake error occurs. When I unchecked it, a Bad Certificate error occurs.

Do you know what I can do in this case to solve it?I looked for some threads in the community, and I didn't find a solution for my case.

4
0 4994
Question Prajesh Patel · Mar 8, 2023

Hello, I am using the power bi report builder tool to create a report with dynamic parameters. Every time I try to create and apply a parameter in power bi query editor. I get the below listed error message. 

FYI: I have created a Data source connection using "InterSystems ODBC" Version 2015.01.00.429. I am getting data without any issue. 

Query: select Payment_History.OCCURENCE_DATE from Payment_History  where Payment_History.OCCURENCE_DATE >= @BeginDate

Error Message: ERROR [42000] [Cache ODBC][State : 37000][Native Code 12]
[C:\Program Files\WindowsApps\Microsoft.PowerBIReportBuilder_15.7.1801.

0
0 314
Question Louie McLaughlin · Mar 6, 2023

I need a stored procedure where I can execute multiple delete from statements. 

This will work to create a stored procedure, but when I add in other delete from, get error invalid sql statements when try to create

CREATE PROCEDURE DeleteSpecimenTwo
  (IN Specno VARCHAR(50))
BEGIN
DELETE FROM PCONT WHERE PSPECNO = :Specno;
END;

This doesn't work

CREATE PROCEDURE DeleteSpecimenTwo
  (IN Specno VARCHAR(50))
BEGIN
DELETE FROM PCONT WHERE PSPECNO = :Specno;

DELETE FROM PSPEC WHERE PSPECNO = :Specno;
END;

Any suggestions

Thanks

Louie

1
0 352
Question Michael Davidovich · Feb 28, 2023

Any ideas on why my %session.Data array would be wiped out after setting %response.Redirect in OnPreHTTP()?

Context: trying to implement a SSO patter for authorization code flow.  I mention this because it's all I can really pinpoint as to what's changing.  Typically a user logs in by providing their username/password and we validate in our database and set the %session.Data property with the user info.

8
0 1707
Article Benjamin Thorne · Jul 17, 2018 1m read

The following code snippet uses GZIP to compress/decompress a file. Choose a file by specifying a file path in the "filename" variable.


Class objectscript.GZIP Extends %RegisteredObject
{
classmethod test() {
//Export Global(s) uncompressed
set filename="C:\Temp\myglobal.xml"
do $System.OBJ.Export("^oddEXTR.gbl",filename)
//Open exported Globals
set uncompressed = ##class(%FileBinaryStream).%New()
set uncompressed.Filename=filename
Set compressed = "C:\temp\mycomglobal.
6
1 2417
Question Sabit Issakhan · Oct 29, 2018

Hello Everyone!

Following the example below i can download file only txt format, in other format(pdf,xls,rar) i have errors(can't open file), 

So, how i will change code for download file in other format? 

Thanks! 

ClassMethod GetFile(file) As %String
{
#dim %request As %CSP.Request
    set filename="E:\Rest\"_file   
    set %response.ContentType=..GetFileContentType($p(filename,".",*))
    do %response.SetHeader("Content-Disposition","attachment;filename="""_$p(filename,"\",*)_"""")
    Set %response.NoCharSetConvert=1
    Set %response.Expires=50
    set file=##class(%File).%New(filename)
    do file

3
1 1493
Article Brendan Bannon · Aug 29, 2016 7m read

The Art of Mapping Globals to Classes 1 of 3

Looking to breathe new life into an old MUMPS application?  Follow these steps to map your existing globals to classes and expose all that beautiful data to Objects and SQL.

By following the simple steps in this article and the next two you will be able to map all but the craziest globals to Caché classes.  For the crazy ones I will put up a zip file of different mappings I have collected over the years.  This is NOT for new data; if you don’t already have existing global please just use the default storage.

26
13 6261
Article Julian Matthews · Jul 21, 2021 4m read

Over the years, I have found myself needing to create multiple HL7 messages based on a single inbound message. Usually these take the form of an order or result from a lab. Each time I have approached it, I have tried to start from scratch under the belief that the previous attempt could have been done better.

Recently, the need arose again and I was able to create a solution that I wasn't ashamed of. My main concern was that I would always either find myself getting buried in a BPL, or use ObjectScript and attempt to edit messages using the SetValueAt Method for the HL7 Message Class.

1
2 1483