#Caché

30 Followers · 4.6K Posts

  

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

Documentation.

Question Evgenii Ermolaev · Mar 16, 2021

I am trying to use Dynamic SQL because I need to supply data at runtime.
The generated query returns 0 rows for some reason. If I copy/paste the query into Monitor, it works correctly. I am suspecting it has something to do with dates being the wrong format (I am supplying them in 'YYYY-MM-DD' format). Is that the cause? And if so, how do I supply dates in correct format?

1
0 270
Question Stuart Byrne · Mar 14, 2021

I had a challenge recently where I was asked to parse and iterate JSON to find a patient that has a forename = "Bill" and try to make the function that iterates through the code re-usable.

Being working in Healthcare there isn't much experience or demand for parsing JSON, as most of my work is HL7.

I took this on using the documentation and worked out a way to parse the JSON (see posts below for code and source data).

I've worked out how to iterate through the fields and repeating elements, however I'm having an issue quitting out upon finding a patient with the forename Bill.

6
0 541
Article Eduard Lebedyuk · Mar 24, 2017 9m read

In my previous article, we reviewed possible use-cases for macros, so let’s now proceed to a more comprehensive example of macros usability. In this article we will design and build a logging system.

Logging system

Logging system is a useful tool for monitoring the work of an application that saves a lot of time during debugging and monitoring. Our system would consist of two parts:

  • Storage class (for log records)
  • Set of macros that automatically add a new record to the log
6
10 3616
Question Alexey Maslov · Feb 6, 2021

During some consulting activity, I found at the client's site CACHEAUDIT database of more than 100 GB size. The reason was simple: several processes produced a great amount of %System/%System/OSCommand audit records due to frequent external calls ($zf(-100,.)). As it is well-known, those events can be easily disabled systemwide, while this can be hardly considered secure enough. Reducing the number of days before audit cleanup from default 62 to some reasonable figure (e.g.

2
0 423
Question Henry Pereira · Mar 12, 2021

Hi community,

I need to write an SQL query with hierarchical order, I have a table with a column referencing itself, similar as the sample bellow:

ID
DATE
MESSAGE
LOGIN
PARENT_ID
1
27/01/21
Bacon ipsum dolor amet pork shoulder ribs
User 1
2
27/01/21
Gouda croque monsieur emmental.
4
0 385
Question Chris Bransden · Mar 11, 2021

Hi! I have a complex SQL select query which I execute via %ResultSet. It also includes a UNION. The select statement within the union should only be done when an external parameter is set, and I'm not sure of way of doing that within SQL, other than something like

SELECT FOO FROM BAR

WHERE (some conditions)

UNION

SELECT FOO2 FROM BAR2

WHERE :doUnion = 1 AND (some conditions)

this works, but I don't think it's particularly optimal as I believe it will still execute the second SELECT regardless of :doUnion.

12
0 653
Question Sorin Petrescu · Mar 8, 2021

Hi,

I have to create to a web socket client, but I'm unable to read any data from the server, after flushing the buffer. I have no access to the server, only two examples for the client, one in java and the other one in php:

java example:

socket = new Socket("192.168.0.1", 2003);

DataOutputStream out = new DataOutputStream(socket.getOutputStream());

out.writeUTF("aPassword");

out.writeInt(websiteId);

out.flush();

DataInputStream in = new DataInputStream(socket.getInputStream());

int orderId = in.readInt();

in.close();
out.close();
socket.

8
0 739
Question Thembelani Mlalazi · Mar 12, 2021

In previous versions of cache I used to be able to write click on a class and get a delete class option but in this version I can not find the delete class option was wondering if there is another way to delete a class if you wanted to do some house keeping.

N.B. These are the classes I create not the ones that comes with cache.

1
0 652
Question Ruslan K · Mar 11, 2021

Is there any reason that property method  DisplayToLogical() is not calling before object saving?

I have such situation and do not know how it is possible

3
0 581
Question Kurro Lopez · Mar 10, 2021

Hi all,

I have a very weird error when I'm calling to a SOAP Webservice as client.

I've create all objects to invoke to this SOAP using the add-in "Assistant SOAP" in Eclipse, it has created all objects (Response, Request, Business operation WS class, etc...).

When I call to this service it retuns the following error message:

ERROR #6243: HTTP request to SOAP WebService returned unexpected CONTENT-TYPE response: text/html.

However, If I call the same WS using SOAP UI or Postman, the header of response has the content-type "text/xml", as expected.

4
0 5229
Question Guilherme Silva · Mar 9, 2021

i have a problem with CSP files, i can create a CSP file with termination ".csp" or ".CSP" and this configuration is case sensitive, but a CLS file, this configuration is not case sensitive. there is a way i can change this to the CSP file don't be case sensitive?

2
0 341
Question Enzo Toscano · Mar 9, 2021

First of all thank you for your time in reading this question and writing a response,

We would need some help,

What is the best method for save a %CSP.BinaryStream to a file?

Thank you in advance!! 

2
0 814
Question Luiz Henrique Carvalho Martarelli · Mar 5, 2021

Hi!

I am making a request to an API and JSON is coming as follows:
SET %httprequest = ##class(%Net.HttpRequest).%New()
DO %httprequest.Get(URL)
SET %responseBody = %httprequest.HttpResponse.Data.Read()
 

W %responseBody
{produto:"CHP0001",Local:{IDMV: "000000001",LOTE: "",DtFabric: "null",DtVenc: "null",Atributo06: "0000000002",Atributo07: "",QtdeDisp: "10.00000",QtdeAloc: "0.00000",QtdeSep: "0.00000",QtdeTotal: "10.

9
0 1127
Article Robert Cemper · Mar 5, 2021 3m read

Migration from Caché to IRIS can be quite a challenge if your code is grown over many years
and probably not so clean structured as you may like it. So you face the need to check your
migrated code against some reference data. A few samples might not be a problem,
but some hundred GB of data for testing might be.  

A possible step could be to have your fresh code in IRIS but leave your huge datastore on Caché and connect both environments over ECP.  I have created a demo project that gives you the opportunity to try this based on 2 Docker images with IRIS and with Caché connected over ECP.

1
0 976
Article Hao Wang · Mar 4, 2021 1m read

Accuracy rate is a measure of our prediction results, and it is a measure of how many of the predicted positive samples are actually positive.
The recall rate is for our original sample, and it shows how many positive examples in the sample were correctly predicted.
Accuracy = Predicted correctly/All
If we want to be able to retrieve as much content as possible, this is the pursuit of "recall ratio", namely A/(A+C), the bigger the better.

0
0 247
Question Joshua Feener · Mar 3, 2021

Getting this error when starting up Caché: 


I've recently deleted several Caché namespaces to clear up space, turned Caché off, and then this started happening. Caché cube is grey, but only the start Caché option is unavailable. 

Caché is still running, but just not completely:

 

The Windows Event Viewer application has the following error: 

There are also the following logs in the mgr/cconsole.log file. I can provide more if necessary. 

03/03/21-14:18:23:206 (13360) 0 START: C:\InterSystems\Cache\mgr\journal\20210303.005
03/03/21-14:18:23:206 (13360) 1 Warning: Alternate and primary journal directories are the same
03/03/21-14:18:23:222 (13360) 0 CACHE JOURNALING SYSTEM MESSAGE
Journaling started to: c:\intersystems\cache\mgr\journal\20210303.005
03/03/21-14:18:23:222 (13360) 0 Journaling to C:\InterSystems\Cache\mgr\journal\20210303.005 started.
//
...some lines later...
//
03/03/21-14:18:25:659 (15652) 0 (ZUTSTART): ^ZUTSTART Version 1.10: Configurable Cache Startup Utility
03/03/21-14:18:25:659 (15652) 0 (ZUTSTART): ZUTSTART is un-tested in this version of Cache.
03/03/21-14:18:25:659 (15652) 0 (ZUTSTART): Running ZUTSTART....
03/03/21-14:18:25:659 (15652) 0 (ZUTSTART): ZUTSTART not configured. Run SETUP^ZUTSTART
03/03/21-14:18:25:659 (15652) 0 (ZUTSTART): To configure, use this command:      DO SETUP^ZUTSTART
03/03/21-14:18:25:659 (15652) 0 (ZUTSTART): For help, use the following command: DO HELP^ZUTSTART
03/03/21-14:18:25:859 (12916) 0 Private webserver started on 57772
03/03/21-14:18:26:214 (12916) 0 Processing Shadows section (this system as shadow)
03/03/21-14:18:26:214 (12916) 0 Processing Monitor section
03/03/21-14:18:27:031 (14768) 0 LMF Info:  License server started on port 4001
03/03/21-14:18:27:447 (148) 0 [System Monitor] System Monitor started in %SYS
03/03/21-14:18:29:036 (14768) 0 LMF Info:  Connected to license server 127.0.0.1,4001
03/03/21-14:19:27:504 (148) 2 1 SSL/TLS Certificate(s) expiring within 30 days. See cconsole.log for details.
03/03/21-14:19:27:505 (148) 1 Certificate 13298795840390663119752826058995181320 Issuer CN=DST Root CA X3,O=Digital Signature Trust Co. (Subject CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US)  expires in 14 days (2021-03-17).
03/03/21-14:19:27:505 (148) 0 Certificate 13298795840390663119752826058995181320 Issuer CN=DST Root CA X3,O=Digital Signature Trust Co. in file c:\intersystems\cache\mgr\groundca.pem used by SSL/TLS configuration(s) "groundca"
03/03/21-14:49:29:062 (148) 0 [SYSTEM MONITOR] Alert state cleared.
03/03/21-15:31:36:247 (15060) 1 Operating System shutdown!  Cache performing fast shutdown.
2
0 1385
Question Anil Mathew · Jan 29, 2017

I have 2 instances of Cache, one of 2010 and the other 2016.  On both I have created a SSL Configuration with same name.

When I connect to a SOAP Service Client from Cache 2010, I get the above error.

If I connect from Cache 2016, the connection get through.

How can get more details of the error in the Cache 2010 instance to be able to fix this issue.

I have enabled the SOAP Log and it does not give much of details.

Regards

Anil

6
1 6039
Question Markus Kogler · Jan 16, 2021

Hi Community,

is there a possibility to implement a "remember password" feature in a ZEN Application?

In the management portal I added a web-application for a ZEN application with password authentification. I created an own login page, and now I want to implement a "remember password" feature (User should not have to login again after the session times out or when the browser window is closed).

2
0 354
Question Ahmad Bukhtiar · Feb 25, 2021

Hi 

I am using below function and it works fine but i want to match the value ignoring the first 4 chars as they are only added to sort the data.

##class(Ens.Rule.FunctionSet).Lookup

For example

My table has following values

0001EMRNameB

0002EMRNameA

0003EMRNameC

w ^Ens.LookupTable("EMRName","0002EMRNameA") this works 

But i want to use something like that

w ^(Ens.LookupTable("EMRName","%EMRNameA") this doesnt works 

3
0 364
Question Andy Coutinho · Feb 25, 2021

Does anyone know how to get the closing tab/menu changing event in a CSP? I've tried the JS "OnBeforeUnload" already but it seems the browsers aren't allowing it anymore. I need to show a pop-up that holds the user if trying to get away before completing the stage.

1
0 198
Question Kurro Lopez · Feb 25, 2021

Hi all,

I have a API operation that is calling to a external process. The answer is a big json but I only want a pice of the full content.

My first attempt is:

.....
// The code of prepare the request is omitted.
set tSC = ..Adapter.SendFormDataArray(.tHttpResponse,"POST",tHttpRequest,,,tURL)
if $$$ISERR(tSC) $$$ThrowStatus(tSC)
// Get the response directly
set response = ""
while (tHttpResponse.Data.AtEnd = 0) {
    set response = respuesta_tHttpResponse.Data.Read()
}
// Convert Json to generic object, get the node returnValue.data and convert to JSon again
2
0 329
InterSystems Official Pete Greskoff · Dec 8, 2020

InterSystems has identified an issue with product distributions containing Certificate Authority certificates that expire at the end of 2020. This issue does not affect system operation or system security in any way, although it does generate alerts about expiring certificates in the cconsole.log or messages.log files. The messages may be ignored and there are instructions below to eliminate them.

The issue affects the following versions:

  • Caché and Ensemble 2017.1, 2017.2, and 2018.
2
3 910
Question Yone Moreno · Feb 23, 2021

We would need some help,

Thanks in advance for your replies,

We can POST directly via POSTMAN only if we disable "SSL certificate verification"

We see the response:

However if we turn on "SSL certificate verification" it shows:

So, when we use Ensemble and a REST Operation, it outputs:

ERROR <Ens>ErrException: <THROW>zdoLoginToken+22^Operaciones.REST.HistoriaClinica.VacunasAPI.1 *%Exception.StatusException ERROR <Ens>ErrHTTPStatus: Recibido estado no correcto 403 del servidor HTTP remoto: 'HTTP/1.1 403 Forbidden' -- - registrado como '-' número - @' Set sc=tSC Throw:('sc) ##class(%Exception.

1
0 522
Question Roberto Cahanap · Feb 19, 2021

Currently in Visual Studio Code when we connect to a Cache server and export the CLS and MAC files, they get placed in the following:

\Comp;anyName\src\Packages

Where the Packages folder corresponds to the different class packages we have. The MAC files are placed in the src folder and not contained in it's own folder.

Is there a way to configure the export for the MAC files so that it's contained in it's own folder like this:

\CompanyName\src\mac

Thanks in advance for your help.

-Roberto

2
0 423