#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Discussion David Underhill · May 5, 2022

I am sure I came across this in the past with Cache and just saw this again in IRIS.

When rebuilding or swapping a DAT file for a database it retains the Resource of the DAT file, not the Resource of the Database it is being used for.

For instance, if I have a local Database called APP with a resource %DB_APP and I want to refresh the data from another Database called TEST that has a Resource %DB_TEST I can just copy the DAT file from the TEST folder to the APP folder.

No Database settings are changed and it is all done with either IRIS down or the databases dismounted.

5
0 235
Question Andy Stobirski · May 6, 2022

Hi 

Does anyone know where the user generated code resides, the stuff one might write for a production,  I presume it lives in a table somewhere within a database?

Basically, I want to do some dependency analysis of what I've written - find out what's in use, how it's referenced, etc. I know  I can export it to an XML file and work on that, but direct access on a table would be quicker for me.

Cheers

1
0 251
Question Ruiyan Yu · May 2, 2022

Hi,

Doc: classMethode DecimalToHex(decimal As %String) as %String
Converts a decimal string to a hexadecimal string.

w !,$System.Util.DecimalToHex(42) > 2A

w !,$zhex(42) > 2A

w !,$System.Util.DecimalToHex(0) is empty

w !,$System.Util.DecimalToHex("0") is empty

w !,$System.Util.DecimalToHex("00") is empty

w !,$zhex(0) > 0

Is the empty string really the intended output?

Best regards

RY

1
0 235
Question Abdul-Rashid Yakubu · Mar 22, 2022

Hi,

Is there a way to find the median in Intersystems Cache SQL? I know it is not available as an aggregate function. Also in SQL Server I could try something like: 

SELECT
(
 (SELECT MAX(Score) FROM
   (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score) AS BottomHalf)
 +
 (SELECT MIN(Score) FROM
   (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score DESC) AS TopHalf)
) / 2 AS Median

However, there is no PERCENT Keyword in Cache as well. Any suggestions?

Thanks

4
0 421
Question Charles Me · Apr 27, 2022

Hi,

I am not able to connect to the local web browser.

If I try to open documentation (http://localhost:57772/csp/sys/UtilHome.csp) I get

Caché Server Pages Version 2018.1.6.717.0
Server Availability Error

Server is currently unavailable

If I call up the log CSP.log I have the following:

Access Denied
    Diagnostic
    Failed to connect to 'LOCAL' - Reason: 0 (Connection successfully made but server not responding) (No Retry)

I cannot figure this out

8
0 1331
Question Kevin McGinn · Apr 26, 2022

I wrote this COS script that I can run in a terminal session to get a view of the cache users:

set hdl = ##class(%Library.ResultSet).%New()
set hdl.ClassName = "Security.Users"
set hdl.QueryName = "Detail"
set sc = hdl.Execute()

while hdl.%Next() { do hdl.%Print() }

I know this is a bit rudimentary  but this seems to be the correct script to get users. But looking at one of the clients AIX based instances there are about 3900 users. But this script returns no results. In fact, after the execute if I issue "w hd.%Next()" it returns 0. I look at "Do DisplayError^%apiOBJ(sc)" and the message is:

4
0 295
Question Scott Roth · Apr 22, 2022

A question has come up that I am not finding the answer for.... Does the daily purge process re-index EnsLib.HL7.SearchTable or other SQL tables?  In looking at the purge process documentation I am not seeing anything that mentions EnsLib.HL7.SearchTable. Do we have to manually constantly re-index tables that we create? For example I created another search table based off of EnsLib.HL7.Search table, will I need to constantly watch this as it grows? How do tables get index, is there some kind of mechanism that automatically does it, or are we responsible for indexing tables ourselves? We are

1
0 345
Question Michael Davidovich · Apr 22, 2022

I am referencing the documentation here: https://docs.intersystems.com/ens201815/csp/docbook/DocBook.UI.Page.cls…

I have embedded html within a <script language="cache" runat="server"> block.  Within that I'm defining and using a macro, but it doesn't display at all. Something like:

<script language="cache" runat="server"> 
s stringData=obj.data 
#Define displayString stringData 
&html< 
<p>$$$displayString</p> 
> 
</script>
2
0 336
Question Kevin McGinn · Apr 15, 2022

When looking at the "Current License Usage Summary" web page, there is a line for both local and distributed "Maximum Connections". I have scrutinized every class that seems reasonable to contain this information but have found nothing that matches the values on the web page. I do not believe these are related to license specifically though I did review all of the potential attributes of the license related classes to no avail.

2
0 348
Article Victor Sanner · Apr 20, 2022 2m read

Hi,

I have wrote an article about how to install the intersystems cache driver in a Docker container, and then deploy it using Azure Functions: 

How to run a (Python) Azure Function as a Docker container & Deploy it using Bicep | Victor Sanner
This might be useful to others, especially the dockerfile which I have copied below. This builds a debian docker container and installs the Intersystems Cache driver, which python can then use :)

0
2 676
Question Abbad Minhas · Feb 3, 2022

We have a requirement to write to an AWS S3 bucket from Cache.

We haven't upgrade to IRIS yet, but are looking at doing so in the future. This requirement cannot wait for the upgrade to happen, unfortunately.

Will appreciate if any one can share any example code, that enables cache to write to an AWS S3 bucket? 

8
1 897
Question Kevin McGinn · Apr 14, 2022

I am writing a Python tools I want to access the %Monitor.System.License properties:

  1. AvailableDist
  2. AvailableLocal
  3. MaxUsedDist
  4. MaxUsedLocal
  5. CurrentUsedDist
  6. CurrentUsedLocal

Initially I want to develop Objectscript to verify access to the properties. But I can not figure the proper syntax.

I first attempted:

set ans = ##class(%Monitor.System.License).AvailableDist

which failed.

I tried another approach:

set ans = ##CLASS(%Monitor.System.License).%GetParameter("AvailableLocal")

2
0 299
Question Smythe Smythee · Apr 13, 2022

Hi Team,

I am working on data transformation ADT^A01 from ADT^A01 ,In both source and target MRG segment is not available. How can i create a new MRG segment in Target. Kindly share your ideas how to create a new segment in Data transformation.

Thanks in advance

2
0 424
Question Lukas Dolezal · Apr 10, 2022

I want to store data in an index global without defining an index in an inherited class.
Example:

Class Aclass [ Abstract ]
{
Index TXSBI On TextSearch(KEYS);
Index TXSSI On TextSimilarity(KEYS) [ Data = TextSimilarity(ELEMENTS) ];
Property TextSearch As %Text(LANGUAGECLASS = "%ZText.Czech", MAXLEN = 1000, XMLPROJECTION = "NONE");
Property TextSimilarity As %Text(LANGUAGECLASS = "%ZText.CzechSim", MAXLEN = 1000, SIMILARITYINDEX = "TXSSI", XMLPROJECTION = "NONE");
...
//other code
Class AAclass Extends (%Persistent, ClassType.SuperClass, Aclass, Bclass...)
{

}
5
0 625
Question Claus Odgaard · Apr 11, 2022

MAXSTRING (longstring) is enabled.

We have a Class containing a property definition

Property SettingsJSON As %Text(MAXLEN = 3600000)

The property is used for storing a string of JSON data however in some cases we get a Cache error: %SaveData error when trying to save a string of JSON a lot less than maximum "allowed" length, any ideas anyone? 

14
0 1575
Article Muhammad Waseem · Apr 5, 2022 7m read

Hi Community,

This post is a introduction of my openexchange iris-globals-graphDB application.
In this article I will demonstrate how to save and retrieve Graph Data into InterSystems Globals with the help of Python Flask Web Framework and PYVIS Interactive network visualizations Library

Recommendation

Step1 : Establish Connection with IRIS Globals by using python native SDK

2
1 833
Question Fabio Care · Mar 29, 2022

Hello, 
I'm currently working on a custom version control implementation. 
I'd like to show differences between a copy of a previously saved routine as a merge of the ^ROUTINE Global and the current version of that same routine. 

I've found legacy Documentation for %RCMP which does the trick in the terminal but I'd like a similar result stored inside a variable. 
I also want to show differences, not only see if they are the same or not. 

The management portal has that exact feature, so maybe someone can direct me to the function that is being used there. 

19
0 925
Question José Pereira · Apr 7, 2022

Hi!

I'd like to know if there are any issues if an index is inserted into a table without running the %BuildIndices() method.

It's important to note that data inserted before the index is not important for retrieval, so it's not a problem data inserted before the index don't show up in queries.

The reason why I'm asking this is that I'd like to avoid index reconstruction on big tables which I need to inser such index.

I'm using Cache 2018.1.

Thanks,

José

8
0 436
Question prashanth ponugoti · Apr 7, 2022

Hi Community,

I have below embeded sql query in object script class

&sql(SELECT count(ID) into :suspendedCount FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='5')
resulting  1095 into suspendedCount

but same query executed in SQL explorer

SELECT count(ID)  FROM Ens.MessageHeader where TargetQueueName not like '_S%' and TargetQueueName not like 'ENS%' and Status='5'

resulting 0

but once i changed where condition  Status='5' to Status='Suspended'

5
0 317
Question Michael Davidovich · Apr 5, 2022

The documentation suggests this method for calling server side methods via SUBMIT: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

Following that, the form I'm submitting needs to validate the dates entered (the startDate isn't past the endDate).  

Trying to keep everything in the .CSP file, I add a tag:

<script language="Cache" method="Validate" arguments="startDate:%Date,endDate:%Date">

I'm able to validate the dates here, but not matter what I do (quit, return false, redirect) the code that runs on the SUBMIT goes:

8
0 365
Discussion Matthew Waddingham · May 17, 2021

We've been tasked with developing a file upload module as part of our wider system, storing scanned documents against a patients profile. Our Intersystems manager suggested storing those files in the DB as streams would be the best approach and it sounded like a solid idea, it can be encrypted, complex indexes, optimized for large files and so on. However the stake holder questioned why would we want to do that over storing them in windows folders and that putting it in the DB was nuts. So we were wondering what everyone else has done in this situation and what made them take that route. 

25
2 1257
Question phillip jack · Apr 2, 2022

Hi Team,

I would like to save the array subscript with in double quotes 

eg sub1=111,sub2=444 (these values are dynamic)

set array(sub1,sub2)=""

It will be saved as array(111,444)=""

but I want to save it as array("111","444")=""

I am trying to save it from the class like """"_sub1_"""" but its not displaying as expected.

Kindly do the need full.

Thanks in Advance

11
0 430
Question Doug Tucker · Mar 21, 2022

When we run data purges in a namespace, the size and space of the DB does not change.  I assume like Oracle it leaves white space that is usable by cache, but is there a way to see how much of this space is available?  Today I increased the size of the disk available to the system as we were reaching critical low disk space,  however, with the purges, we should have several hundred GB of available space inside the database to use.  And is it safe to allow the system to run out of available disk space, as long as there is enough free space in the DB for writing data?

6
0 913
Question Rahul Reddi · Apr 2, 2022

Hi Team,

We are facing an issue connecting to a remote Cache DB server using CacheODBC 2018 on the client side.

The connection works fine without SSL on the Cache server, but when SSL is enabled, we are getting the below error - "Failed to load cconnect executable!, SQL state 08S01 in SQLConnect"

Also, the connection works fine when the PHP script is run through CLI on client server, but fails with the above error when the script invoked from a client browser.

Could you please help us with any pointers in resolving the issue?

0
0 199
Question Anderson F · Apr 1, 2022

Hello everybody.

My question originated when trying to help a coworker...

There is a system module, specifically a ClassMethod that inserts records into a table as per the pseudocode below:

set Obj = ##class(FooSchema.FooTable).%New()
set Obj.fooProp = fooValue
// Other Foo properties //
set status = Obj.%Save()

From time to time, when trying to save the object, an error , informing that it was not possible to obtain the exclusive lock on the table instance

I want, using objectscript, to find out which other part of the system (Classmethod) is causing the lock on this table

2
0 271