#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Aiymann Amirova · Mar 19, 2021

Hi everyone.

I wonder, whether is it possible to get description of emoji in COS.

For example, I have data with emojis like 🙏 in database, that should be delivered to transaction system via service. But service doesn't support emojis, so I want to convert emoji to its unicode description like "Person with Folded Hands". Is it possible? I'll be grateful for help

1
0 276
Question Julian Matthews · Mar 17, 2021

Hey everyone.

I have a process where I create a new %Stream.FileCharacter object, specify the filename (including it's path), write data to the stream, and then save. However for some reason, if the user account does not have write access to the directory, the %Save method is still returning true even though it was unable to actually write the file to the folder.

The location is a UNC path, and I'm wondering if this is tripping me up?

3
0 449
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 245
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 511
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 3509
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. 15) seems to be a better solution, but...

2
0 386
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.
User 2
1
3
27/01/21
Manchego fromage frais airedale
User 3
2

Oracle database has Hierarchical Query, to do something like that:

SELECT id, MESSAGE, parent_id
   FROM messages
   CONNECT BY PRIOR id = parent_id;
4
0 350
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. It's also sort of hard to read...

12
0 615
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.close();

php:

$this->socket = socket_create(AF_INET, SOCK_STREAM, 0);

8
0 699
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 628
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 548
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 5091
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 311
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 780
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.00000",Status: "OK",Motivo: ""}}

9
0 1050
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.

2
0 928
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/AllIf 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.If we want to retrieve documents that we really want, that is, relevant as much as possible and irrelevant as little as possible,This is the pursuit of

0
0 226
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. 

2
0 1330
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 5938
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 328
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 332
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 168