#Caché

30 Followers · 4.6K Posts

  

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

Documentation.

Question Lucas Macori · May 7, 2021

Hello everyone,

We are trying out lists inside persistent classes. Because we may need to use them in a very close future.

So far, I managed to create a class that has a list property which has an indice.

Here is the class in question:

Class User.TestList.Data.
8
0 483
Question Martin Staudigel · May 12, 2021

Hello Community,

we read data from an Oracle database. The desired order is created by an 'order by' in the sql statement. The individual elements of the result set are converted into objects and inserted into a parent object using 'insert' on a property, which implements a one-to-many relationship with the result objects. Later, we iterate over the objects in a for loop and process the contents. At this point the order is apparently no longer identical to the order in which the elements were inserted.

5
0 438
Question Mark Runyan · May 5, 2021

I'm looking for a SQL function equivalent for SQL server STRING_SPLIT.   I have records like this:

join_to_tx_history (key), ss_note_multi_dict_1_value (varchar)



64559.001 Assistant Principal, Case Worker, Client, Dad, Daughter, Mentor, Mom, Other, Principal, Psychiatrist, School Counselor, Teacher

and I like the field ss_note_multi_dict_1_value split to rows for each comma delimited value.  So I can get this:

64559.001    Assistant Principal
64559.001    Case Worker
64559.001    Client
64559.001    Dad
64559.001    Daughter
64559.001    Mentor
64559.001    Mom
64559.001    Other
64559.

2
0 1014
Question Ruiyan Yu · May 14, 2021

Hello everyone, I can choose between RSA and DSA. ECC seems to be unsupported. Is there any workarounds without using external binary like curl?

Best regards RY

5
0 483
Question Daniel Bertozzi · May 14, 2021

Hi all

I'm trying to recreate this method below in Cache/IRIS. 

https://en.wikipedia.org/wiki/Luhn_mod_N_algorithm ISO-7812-1 (LUHN-10)

I've been following the javascript example. It seems simple in theory but i'm struggling with which cache methods to pick.

$LENGTH, $System.SQL.FLOOR() - seem ok

$EXTRACT - I think for .charAt (though may need to correct base)

$FIND - for .indexOf

Any suggestion which would be the best ones for the job?

Thanks

Dan

5
0 315
Question Adel Elsayed · May 14, 2021

I'm trying to connect to a database (outside Cache) using the examples here:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

and https://docs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=BGOD_…

and i'm still getting an error on running the Connect method ( Connect(pDSN,usr,pwd,0))

"0 "_$lb($lb(6022,"DSN/User Connect",,,,,,,,$lb(,"TRAK",$lb("e^zConnect+15^%Library.SQLGatewayConnection.1^2","d^zConnect+13^%Library.SQLGatewayConnection.1^2","e^^^0"))))/* ERROR #6022: Gateway failed: DSN/User Connect.

1
0 543
Question Anna Golitsyna · May 12, 2021

There is an undocumented command, $preprocess, that can be called as below. In this case it takes the class name and converts its code into a text array. That includes comments as well. Two questions about it if you know:

  1. Is that the only job that $preprocess does?
  2. Why would it generally work for most classes except for a single class? This is probably a bug since it works in a later Cache option for this class too but I need to work with this Cache version as well. This class does not contain any control characters except for plain vanilla tabs, checked.
8
0 322
Question Jenna Makin · Sep 5, 2017

Hi-

I have a REST client that calls a REST service and as a response gets a stream containing a JSON structure.  The service is placing some weird non-printable characters into some places in the JSON document that is throwing off parsing of a down-stream XML document.

What I would like to do is just remove the non-printable characters from the response stream that comes back from my call to the REST service.

Does anyone have a handy utility or method for removing all non-printable characters from a character stream?

10
0 2819
Question Jude Mukkadayil · May 12, 2021

Hi ,

     I am trying to retrieve the contact type column data of a patient based on the recent date as shown below.

for instance

 contacttype      Datefrom

contact 1.       24/03/2020

contact 2.        20/05/2021

i need to retrieve the second contact2 based on the recent date.

i tried  like below but not working .

Case max(datefrom) >0 then contacttype

End as contacttype

Can anyone please tell me why this is not working.Any other options?

Thanks 

jude 

3
0 381
Question Ponnumani Gurusamy · May 11, 2021

Hi Team, 

      A month ago, we purchased the cache license for a 10user limitation. We are a 6developers and using 3different development (internal)servers for this same license. All Developers aren't login at the same time. We have a limitation for login 2developers at a time in a server. But sometimes, we are facing a <LICENSE LIMIT EXCEEDED> issue. We don't know why we are facing this one. So anyone please guide me, why we are getting this type of issue. I have attached the errored screenshot.

Thanks, 
Ponnumani G 

2
0 991
Question Evgenii Ermolaev · Apr 29, 2021

I need to show the absence of data, so I have to join the list of predefined values with a result of a select statement.
However, it seems like Table Value Constructors in JOIN are either not supported, or I do not understand the syntax.
Basically, I am going for something like this:

Select v.valueId, m.name 
 From (values (1), (2), (3), (4), (5)) v(valueId)
     left Join otherTable m
        on m.id = v.valueId

Is it supported in Cache SQL or not?

6
0 227
Question Rico Rivera · Apr 23, 2021

May I ask what the solution is to the error below?

Recovery started at Fri Apr 23 09:14:58 2021
     Current default directory: c:\intersystems\cache\mgr
     Log file directory: c:\intersystems\cache\mgr\
     WIJ file spec: c:\intersystems\cache\mgr\CACHE.WIJ
Recovering local (c:\intersystems\cache\mgr\CACHE.WIJ) image journal file...
Starting WIJ recovery for 'c:\intersystems\cache\mgr\CACHE.WIJ'.

5
0 1441
Question Mike Dawson · May 4, 2021

Hello Community,

We want to send ALL updates from our Cache server to a remote SQL Server instance that will be used as a reporting data warehouse.

Has anyone done this already and if so what is the best way to go about setting this up?

Thanks

Regards

Mike 

2
0 356
Question Andre Larsen Barbosa · May 3, 2021

Hello. I have a query in the database that returns several rows, I need to get an "X" number of results randomly. I tried traditional commands from other languages but was unsuccessful. Does Caché have something like that?

8
0 779
Question Fábio Campos · May 3, 2021

Hi,

I'm getting thousands of errors like the ones below:

2021-05-03 14:11:44 [SQLCODE: <-400>:<Ocorreu um erro fatal>] [Cache Error: <<READ>Dispatch+14^%SYS.BINDSRV>] [Location: <ServerLoop>] [Client info: <Username: KIORAS, Node Name: 3IK0VLS5UU, IP Address: 192.168.1.223, Executable Name: EXTRService.exe, Internal Function: B0>] [%protocol: <52>] $Id: //ce/2018.1.2/kernel/common/src/aclass.c#1 $ 23468 104


2021-05-03 14:35:39 [SQLCODE: <-400>:<Ocorreu um erro fatal>] [Cache Error: <<READ>ServerLoop+16^%SYS.

1
0 702
Question Emanuel Lazar · Apr 30, 2021

objects in javascript :

var oM = new Object;

var mMode=["down","up","click"] ;
var key,val ;
    for (key in mMode)
    {

       val = mMode[key] ;
        oM[val]={} ;
        oM[val].id   ="" ;
        oM[val].type ="" ;

       ...

 }

so I can access the .type directly as :

oM.down.type

or:

oM["down"].type

what is the syntax in CACHE or IRIS, to achieve such approach via class/key/property...?

acctually: class/object/key/property anlaogue to ^GLOBAL(key,"property")=val

9
0 358
Question Evgenii Ermolaev · Apr 29, 2021

Let's say I have a persistent class Sales.
I need to create a report that shows the amount of sales for each branch.
By simply using the class Sales for the source of the cube, I can show what I want with one little exception - the branches that did not have any sales are not shown.
Is there a way around that that does not involve creating a whole new table just for this cube or using a Data connector (they have horrible documentation and I am unable to figure out how to use them properly)?

3
0 243
Question Kevin Furze · Apr 26, 2021

The boss (reasonable intelligent ;-) wants to connect to the cache database through Excel, but unless I explain what he's looking for (field names DB names etc) then I can see him continually coming back for "what's the link here and how do I get the delivery company name etc etc"

is there a SAFE way I can give him access to our database using an intelligent visual user interface.

I had thought about the SQL Query Builder within the management portal, but the thought of giving him access to all of the other functionality of the management portal.

3
0 361
Question Eduard Lebedyuk · Feb 4, 2019

I want to consume external websocket api, URL looks like this:

wss://site.com/ws/v2/?&token=<token>

Checked with external tool (Simple WebSocket Client) that websocket works and I can consume the data.
In Cache the relevant functionality is offered by %IO.Socket class.

set sock = ##class(%IO.Socket).%New()
set sock.SSLConfig = "MyEmptySSLConfig"
set sock.TranslationTable="UTF8"
do sock.Open("site.com/ws/v2/?&token=<token>","443", 10,.sc)

However I get this error:

ERROR #7109: Timed out after 10 seconds trying to open stream '|TCP|443|42881' [zOpen+41^%IO.Socket.
17
0 1641
Question Karl Kirk · Mar 1, 2018

Are there any BDD testing automation implementations within Mumps/Cache Objects already in existence?
We are looking at using Cucumber for our Java regression test automation and would like to use similar feature file testing with the Cache code.


Looking to use something existing before building it.
Regards,
-Karl

5
1 1098
Question Fábio Campos · Apr 27, 2021

Hello everyone!

Some time ago, I changed the configuration in SQL Runtime Statistic to "Turn on Stats code generation to gather stats at the Open and Close of a query". With this change, the CACHE base (cache/mgr/cache/) has grown a lot to reach 198GB.

Yesterday, I returned the configuration of SQL Runtime Statistic to the default which is "Turn off Stats code generation" and the cache base is no longer growing.

My question is?

How to delete this data that was created in the CACHE base (cache/mgr/cache/) and what data I can delete without affecting the system.

Thanks,
Fábio Louly.

3
0 282
Question Alex Kogan · Apr 26, 2021

Hello,

I have a quick question regarding TSTART, however not certain if there is an answer.

If I am inside the transaction and I loose connection - I always assumed that transaction would TROLLBACK, however it does not.

Is there anything special I need to set up with my TSTART, in order for this transaction to safely rollback?

*********

As example: Let's say I am inside the TSTART and setting up / altering some data and my VPN connection got disconnected.  I kind of expect all the data to be rolled back.  

Thank you,

Alex

6
0 317
Question Kurro Lopez · Apr 23, 2021

Hello everyone,

I don't want to believe that Intersystems didn't add a method/process/rule to sort alphabetically a list of names (in array, $ LB or whatever)

I haven't found any documentation about this. I've even tried comparing two strings but have not found a solution.

My cry for help is...

Does exists any command to compare two strings and check if one of them is lower or upper according to aphabet?

Please, give me a light in this dark

Best regards.
Kurro Lopez

7
0 1275