#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Article Daniel Kutac · Feb 11, 2019 4m read

Hi guys,

Couple days ago, a customer approached me with the wish to enhance their existing legacy application, that uses SOAP (Web)Services so it shares the same authorization with their new application API based on REST. As their new application uses OAuth2, the challenge was clear; how to pass access token with SOAP request to the server.

After spending some time on Google, it turned out, that one of possible ways of doing so was adding an extra header element to the SOAP envelope and then making sure the WebService implementation does what is needed to validate the access token.

1
3 12153
Article Jenna Makin · Nov 9, 2015 1m read

The attached code package provides a simple implementation of a web service client that utilizes the USPS Shipping API to normalize  an address.

This code requires the developer to obtain a USPS Shipping API user ID which can be obtained from the USPS shipping API website.  The assigned User Id can either be passed into the web service call as a parameter or can be coded as a parameter into the Request object.

1
0 494
Question Augusto Estefan · Mar 30, 2020

Hi, 

I'm having a problem when I'm attempting to freeze the instance.

I have a pre-script and post-script to freeze and unfreeze the instance, but when the script execute: 

 csession INSTANCE_NAME -U '%SYS' "##Class(Backup.General).ExternalFreeze(\"$SNAPLOG\",,,,,,1800)"

 It's give me this error and fails the freeze: 

Backup.General.ExternalFreeze: Failed, Unable to switch local journal file, Error: -99,ERROR #1142: Error switching journal file: 0
vi

 

At cconsole.log file show this:

Warning: Alternate and primary journal directories are the same
03/30/20-12:07:24:868 (2710) 2 Could 
4
0 749
InterSystems Official Pete Greskoff · Apr 2, 2020

InterSystems has corrected a defect that can result in data integrity issues on systems using mirroring.

This defect affects:

  • All currently released versions of InterSystems IRIS and IRIS for Health, except 2020.1
  • Caché and Ensemble versions beginning with 2011.1.1
  • All HealthShare products based on the above Data Platforms versions

This defect is more likely to be encountered in IRIS and IRIS for Health 2019.4. It is highly unlikely to have occurred on deployed systems running any other version.

The issue can only occur in a situation that meets all of the following conditions:

  1. A database
0
0 223
Question Kevin Clancy · Mar 26, 2020

The intersystems documentation gives the same description for both <MAXSTRING> and <NETWORK DATA UPDATE FAILED - MAXSTRING>. I suspect that the description for <MAXSTRING> is correct and the description for <NETWORK DATA UPDATE FAILED - MAXSTRING> was an accident. I would like to know what situation triggers the <NETWORK DATA UPDATE FAILED - MAXSTRING> error.

If I had to guess, I would say it means that a MAXSTRING error occurred on the data server while it was attempting to process a request from the app server; instead of sending back the expected response, the data server sends back someth

2
0 492
Question David Losiewicz · Apr 1, 2020

I want to create a CSP page that returns a pdf. The pdf is identified by a pdftoken parameter.

My goal is to validate the token and return the pdf (ContentType=”application/pdf”) if the token is good and return a text error message "Bad Token" (ContentType=”text/plain”) if the token is missing or bad.

My issue seems to be associated with ContentType. I can define one ContentType that works for the pdf or the error message. I am unable to change the ContentType.

Any assistance is appreciated.

ClassMethod OnPage() As %Status { set pdfToken=$get(%request.Data("pdfToken",1)) if pdfToken="" {

2
1 447
Question Davi Massaru Teixeira Muta · Mar 29, 2020

Hello everyone!

I have an abstract class representing the possible inputs for an Enum field, in the following way: 

Class system.dto.sector.SectorStatusEnum  [ Abstract ]{Parameter Active = 1;Parameter Inactive = 2;Parameter Production = 3;Parameter Upkeep = 4;}

I need to create a persistent class referencing the abstract class in the status field, so that the result of the operation is the same as the example:

Class datas.TblSector Extends %Persistent{Property Description As %String( MAXLEN = 100 ) [ Required ];Property Status As %String(VALUELIS
9
0 1477
Question Jenna Makin · Mar 30, 2020

Hi-

I have a class that specifies that streams should be stored in SSA.DocumentCacheS, however, they are getting stored in CacheStream instead.

How can I get streams to properly store in SSA.DocumentCacheS?

Here's the section from my storage definition that shows the StreamLocation

<DataLocation>^SSA.DocumentCacheD</DataLocation>
<DefaultData>DocumentCacheDefaultData</DefaultData>
<IdLocation>^SSA.DocumentCacheD</IdLocation>
<IndexLocation>^SSA.DocumentCacheI</IndexLocation>
<StreamLocation>^SSA.DocumentCacheS</StreamLocation>
<Type>%Storage.Persistent</Type>

But when I look at the g

6
0 506
Question Florian Hansmann · Mar 31, 2020

Hi Caché-Developers!

My Caché Version: 2014.1 and the CSP-Gateway Version ( + Apache) also. I can't upgrade now. 

I want create a Web-Socket for my Chat  like in that Tutorial:

https://community.intersystems.com/post/tutorial-websockets

And there's my problem. When I set SharedConnection like:

set ..SharedConnection = 1

I get on init connection with the server that message:

First i think everything is okay but here i also didn't get the Messages on init from Server-Side:

When I now send a message to the WebSocket, I got following error:

Without SharedConnection = 1, everythin

1
0 361
Announcement Dmitry Maslennikov · Mar 27, 2020

I am glad to say that VSCode-ObjectScript reached 4000 installs. Thanks to all of you who use it in their work.

VSCode-ObjectScript is an extension for VSCode which allows you to develop InterSystems based applications on ObjectScript using the modern code editor developed by Microsoft. Choice #1 editor amongst all developers worldwide by Stackoverflow survey 2019.

Some short notes about how to install and configure it you can find here.

If you need any help with a migration process of your development team to VSCode, please contact us by info@caretdev.com.

3
0 368
Article Henrique Dias · Mar 29, 2020 4m read

Hi developers!

When @Evgeny Shvarov announced the first InterSystems IRIS Programming Contest, I started looking for new ideas.  

I put together a few ideas, and that's what isc-utils is about.

  •  Conversions
    • Temperature
    • Length
  • Exchange Rate
  • Weather

Temperature Scale Conversion

IRISAPP>write ##class(diashenrique.Utils.Temperature).CelsiusToFahrenheit(28)
82.4

IRISAPP>write ##class(diashenrique.Utils.Temperature).CelsiusToKelvin(28)
301.15

IRISAPP>write ##class(diashenrique.Utils.Temperature).FahrenheitToCelsius(82.4)
28

IRISAPP>write ##class(diashenrique.Utils.Tem

laugh

0
0 336
Article Henrique Dias · Mar 29, 2020 1m read

Hi Developers!

Create Database, Namespace, REST Applications using Portal Management is an easy task. You just need a few clicks or maybe more clicks than you expect.

But, what if you traded all those clicks for a simple command-line ?!

IRISAPP>do ##class(diashenrique.Utils.GenerateDB).CreateNew

You just need to answer a few questions: 

Do you want to create a new Database/Namespace? (Y/N) : 

Choose your Namespace name : 
Choose the Dataset location <Path Default is mgr directory> :
Make this an Interoperability namespace? (Y/N) : 
Do you want to split the database into CODE/DATA? (

0
0 338
Article Gevorg Arutiunian · Aug 31, 2018 1m read

This code snippet changes all passwords in a system to a specified string. The two literal strings at the beginning of the snippet can be adjusted to edit the system or password string. The class method "test" runs the code:


Class eduardlebedyuk.changePasswords Extends %RegisteredObject
{
	ClassMethod test()
	{
        set ns = $namespace
	    zn "%SYS"
	    set NewPass = "NewPassString"
	    set rs=##Class(%ResultSet).%New("Security.Users:List")
	    set st = rs.Execute()
	    while rs.Next() { set st=$SYSTEM.Security.ChangePassword(rs.Get("Name"),NewPass)}
        zn ns
	}
}

(Originally po

7
0 883
Discussion Maks Atygaev · Mar 28, 2020

DISCLAIMER: I am not an InterSystems engineer or a professional ObjectScript developer.

I just want to share my opinion about some things I am really miss in ObjectScript.

I really appreciate everyone who support my project (Declarative ObjectScript) in contest

but the post is not about "why you should support me" on contest.


I faced with ObjectScript in the university while was working on my diploma (in 2013).

Very good mentor @Evgeny Shvarov helped me to get started with ObjectScript development.

In those days I was surprised about ObjectScript doesn't support passing methods to an




2
0 292
InterSystems Official Pete Greskoff · Feb 27, 2020

Starting in March 2020, Microsoft plans to release a series of security updates that will cause Windows Active Directory (AD) servers to reject unencrypted simple binds. For more details on the changes to Active Directory, see Microsoft’s Security Advisory ADV190023.

Instances of all InterSystems products using LDAP with Windows AD servers for user login can be impacted if they are not already properly configured to use TLS/SSL. The impact is not limited to instances running on Windows versions. The potential impact exists whether instances perform LDAP authentication directly or via the Dele

2
1 541
Question Rubens Silva · Mar 27, 2020

Hello,

We're considering adopting the ZPM solution as a way to manage many of our customer updates. However in order to do so we need to know a few things.

  • Is ZPM client compatible with Caché 2017.x versions?
  • Can we configure a self-hosted registry that doesn't require a GitHub repository link?
  • Could the ZPM client zip and upload the whole package (all classes, routines, includes) instead of downloading it from a Github link?
  • Can we declare a module that specifies classes themselves instead of their package counterpart? e.g. My.Class.CLS instead of My.PKG.

We need all these questions to have

1
0 311
Question Yone Moreno · Mar 25, 2020

Hello,

We have been reasearching how could we parse a string with a JSON structure like the following:

{"code":200,"type":"Consulta","message":"Operacion correcta","result":[{"id":38802130,"paciente":null,"prestacion":{"codigo":"1.52","descripcion":"Extracción ordinaria","tipo":null},"agenda":{"codigo":"TLAB","descripcion":"LABORATORIO CAE TELDE","sala":""},"servicio":{"codigo":"EXTIN","descripcion":"Unidad de Extracciones Insular"},"centroDerivacion":{"codigo":null,"descripcion":null},"centro":{"codigo":"350290","descripcion":"CHUIMI"},"medico":"Nombre4251 Apellido1_4251 Apellido2_42



1
0 381
Question Oliver Wilms · Mar 26, 2020

Hello,

While working on my Iris contest application FileMailer, I got an error today trying to send email with code that used to work. I added debugging entries and I can see it happens in %Net.SMTP class "Send" method. I am not using any credentials or SSL. I see it opens |TCP|25 device. It issues a series of commands to SMTP server (I was testing with smtp.va.gov and port 25). "init" command gets 220 response.  It runs "Login" method. Response is 250. The next command is "MAIL FROM" and I see 250 in the response with sender ok. The next command is "RCPT TO". Again, response is 250 with reci

1
0 1253
Article Fabio Goncalves · Apr 18, 2017 9m read

Introduction

The common requirement in many applications is logging of data changes in a database - which data has changed, who changed them and when (audit logging). There are many articles about this question and there are different approaches on how to do that in Caché.

I'm sharing a mechanism that can help you implement your framework to track and record data changes. This mechanism creates a trigger through an "objectgenarator" method once your persistent class inherits from the "Audit Abstract Class" (Sample.AuditBase). Since your persistent class inherits Sample.AuditBase, when you co









9
2 2657
Article Dmitry Maslennikov · Mar 24, 2020 2m read

I hope you already know one of my projects Cache Blocks Explorer. I've recently renamed it to Blocks Explorer.

For the recent contest, I've added a new feature, the ability to generate a static picture of any Cache or IRIS database. Like below. Where unique globals have a unique color. This is how looks like inside 9.5GB database. Where 1 pixel represents one block. By link on image you will get even bigger image, with more detalization.


6
0 445
Question Yone Moreno · Mar 26, 2020

Hello,

We are developing a method to take two messages which have a list of data types. It is being defined as:

Class Mensajes.Response.HistoriaClinica.ConsultaCitasResponse Extends Ens.Response [ ProcedureBlock ]
{

Property informacion As EsquemasDatos.HistoriaClinica.Informacion;

Property datos As list Of EsquemasDatos.HistoriaClinica.ConsultaCitas;

Property error As EsquemasDatos.HistoriaClinica.Error;

}

Inside datos we have:

Class EsquemasDatos.HistoriaClinica.ConsultaCitas Extends (%Persistent, %XML.Adaptor) [ ProcedureBlock ]
{

Property fecha As %String(MAXLEN = "");Pr



1
0 757
Question Yone Moreno · Mar 26, 2020

Hello,

We are developing a Transformation and we are wondering: how could we debug and show a XML message which is being an output from a transformation, without storing it into request/response/callrequest/callresponse? We mean, how could we show a context variable in the production?

For example, let's have a transformation which stores an appointment in a variable called: context.especializadasConFormatoPrimarias

How could we show in the Production?

Currently it is being stored as the Transformation's output:

And the way we have found to be able to see what looks like our out

1
0 286
Question Daniel Lee · Mar 24, 2020

I just tried to log into our QA server and connect to Terminal (v 2013.1). 

I can type in my username but when I attempt to type my password, no characters are typed. When I press ENTER the password is invalid. 

I can connect to the management portal and the studio development environment without any problems.  Also, I do not have this problem when connecting to the terminal in our production environment (2010). 

Does anyone know what can cause this type of problem? 

Thanks. 

2
0 338
Question Yone Moreno · Mar 26, 2020

Hello,

We have a tranformation where we would like to convert a date from the following format:

"'dd/mm/yyyy' 'hh:mm'" (double quotes are just visual to indicate this is a string)

to date and time separated:

date: dd/mm/yyyy

time: hh:mm

We have already splitted the datetime into date and hour as follows:

  set fechaHora = source.result.GetAt(indice).fechaHora
 
  $$$LOGINFO("fechaHora: "_fechaHora)
 
  set fechaHoraSinComillas = $replace(fechaHora,"'","")
 
  $$$LOGINFO("fechaHoraSinComillas: "_fechaHoraSinComillas)  
 
  set fecha = $piece(fechaHoraSinComillas," ")
 

1
0 491
InterSystems Official Pete Greskoff · Mar 25, 2020

InterSystems has corrected two defects that, in rare circumstances, can result in data integrity corruption after running global compaction, database compaction, or database defragmentation. InterSystems recommends avoiding these utilities until after applying the corrections listed below.

  1. The first defect is caused by database compaction, defragmentation, or global compaction, and can result in database corruption. If you have used one of these utilities on a database, InterSystems recommends that you perform an integrity check on it. This will identify any data corruption that has occurre
0
0 311
Article Gevorg Arutiunian · Jul 6, 2018 6m read

GraphQL is a standard for declaring data structures and methods of data access that serves as a middleware layer between the client and the server. If you’ve never heard about GraphQL, here is a couple of useful online resources: here, here and here.

In this article, I will tell you how you can use GraphQL in your projects based on InterSystems technologies.

24
10 2894
Question Swathi Chilukuri · Mar 19, 2020

Hi ,

I have a code written in cache  sql and trying to understand it, below is the code , can anyone help me understand what does that mean 

ex - !! dosage_unit !!

SELECT (CASE WHEN (order_description IS NULL OR (order_description='')) THEN '' ELSE (order_description) END) !! (CASE WHEN (dosage IS NULL OR dosage_unit IS NULL OR (dosage='') OR (dosage_unit='')) THEN '' ELSE (', ' !! dosage !! ' ' !! dosage_unit !!

Thank You in advance.

12
0 353