#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Article Fabio Goncalves · Apr 19, 2017 5m read

In the previous article, I have demonstrated a simple way to record data changes. At this time I have changed the "Audit Abstract Class" which is responsible for recording audit data and the data structure where the audit log will be recorded.

I have changed the data structure to a parent and child structure where there will be two tables to record the "transaction" and the "fields its values" changed on that transaction.

Take a look at the new data model:

Take a look at the code changed from "Audit Class":

4
1 1186
Question Rubens Silva · Nov 12, 2019

Pretty straight forward.
I'm tempted to hard-code ISO-8859-1 inside my VSCode extension when working with CSP because this seems to be the encoding used by default, but I need to know if there's any other possible configuration. So can you share your experience when working with CSPs? Like issues with encoding, discoveries regarding it, workarounds etc.
Also, can someone tell me if it's possible to work with UTF-8 encoded CSP files using Atelier without breaking the encoding of the output file?

3
1 932
Article Stephen De Gabrielle · Nov 8, 2019 2m read

Hi, 

It turns out that on windows if you run a command with a windows command file you need to escape the % character as %%

In my case I could test freeze and thaw calls at the command line successfully as

..\bin\cache -s. -U%SYS ##Class(Backup.General).ExternalFreeze()

...but when my freeze script ran it would fail.

it turns out that a single '%' is striped when run in a windows command file, and it must be escaped as '%%' windows gets:

..\bin\cache -s. -USYS ##Class(Backup.General).ExternalFreeze()

So make sure your freeze and thaw scripts and include a double %%; 

3
0 998
Question Paul Hula · Sep 3, 2019

Hi,

  I believe the healthshare Debug module did this (if you added it) but I no longer have access to Healthshare to look so am asking here.

Suppose I have;

Set fruit="apple"

set person="john"

d ..Something(fruit, person)

quit

ClassMethod Something(objs...) {

  ; Names of variables passed in

}

In side "Something" how can I see the original name of the variable passed in (i.e. know the variables passed in were called fruit and person and not just their values).

3
0 364
Article Joel Solon · Oct 30, 2019 4m read

A few years ago, I was teaching the basics of our %UnitTest framework during Caché Foundations class (now called Developing Using InterSystems Objects and SQL). A student asked if it was possible to collect performance statistics while running unit tests. A few weeks later, I added some additional code to the %UnitTest examples to answer this question. I’m finally sharing it on the Community.

2
2 738
Question Laura Cavanaugh · Nov 7, 2019

Hello community!

I have a question about the %OnSave method of a class.  We have a class that  has two properties that are classes. 

Class A

Class B

Class C

Class A.PropertyB as Class B

ClassA.PropertyC as Class C

Classes B and C also need to point back to Class A - it's just the way it is.  We need to be able to use any one of these classes and get to the others (it's actually even more complicated than this, as Classes B and C also have a PropertyC and PropertyB as well, respectively) :

ClassB.PropertyA as Class A

ClassC.PropertyA as Class A

3
0 1142
Question Laura Cavanaugh · Nov 1, 2019

Hello Community,

We have two live servers running DeepSee dashboards for users.  One of the servers can print a widget to a pdf file, and the other can't.  

I learned that 1) a Java JRE needed to be installed on the second server, and 2) it's trying to run an OS command to render a pdf file (details below).

An audit log of the event shows this:

Routine   convertXslToPdf+44^%SYS.cspServer2 |"^^c:\intersystems\ensembleprod\mgr\"|
O/S Username   CSP Gateway
4
0 311
Question Rick Clayton · Sep 17, 2019

We are currently implementing the Data Innovations Instrument Manager product.  In setting up our backup process we are wanting to use Veam snapshots. The application runs in a Caché 2016.1/Windows Server 2016 instance.  We are running an HA primary/secondary/arbiter config. The statement below is from DI.  I am curious to see what others that have implemented the DI Instrument Manager in the same or similar config have in place for backup.

"DI recommends is recommending that we not perform snapshots, but if you do choose to do so, here is some important information to consider.

4
0 824
InterSystems Official Pete Greskoff · Nov 4, 2019

InterSystems has corrected several critical defects that can result in data integrity issues. These defects were identified and corrected within a short time, so InterSystems has simplified the upgrade process by consolidating them into a single package. The effects of encountering these defects may not always be visible. These defects affect InterSystems IRIS, IRIS for Health, Health Connect, Caché, Ensemble, and HealthShare products. All of these defects relate to the application of journal data.

1
2 500
Question Alex Kogan · Nov 5, 2019

I have a custom written date, setup as myDate in my application, which always behaved fine for years, and now it's acting a little weird. 

When I run SQL in Display mode the date shows as 1/10/1841 for some but not ALL rows.

When I run the same exact query in logical Mode the date shows normal format, in my case, for example 10/1/2019.  When the application is running is shows the incorrect date.  When I run the terminal session and open a ref point and ask to write a date is shows 10/1/2019, but I am expecting internal format here - 65287.   

4
0 401
Question Yone Moreno · Oct 13, 2019

We have in DB two books, first is loaned because it has the Friend ID, and the other is in the shelf.

I execute a class query to get all loaned books:

    Query BooksLoaned() As %SQLQuery
    {
        SELECT *
        FROM Library.Book
        WHERE Friend IS NOT NULL
    }
 

Which I have tested throught the portal:

My task is to retrieve all the loaned books and return them in an array. Method code:

6
0 515
Question Kelly Blake · Nov 1, 2019

I would like to Compact globals in a database to free up space.   

I would begin the process on Saturday morning, but am concerned, due to the size, that it would not complete by Sunday evening.  I understand that the process is setup so that it can run with users on the system, however, as the advice indicates, this would not be ideal.

Can the process be stopped if it does not complete by the time you want/need it to?

Do you know how to guestimate how long the process would take?

This is the Freespace for the database in question.  There are 1047 globals of which one of them takes up 50%.

7
0 726
InterSystems Official Jeff Fried · Nov 4, 2019

Caché  2018.1.3 and Ensemble 2018.1.3 maintenance releases are now available.   

Full product installation kits can be downloaded from the WRC Software Distribution site.

This is a maintenance release with many updates across a wide variety of areas.

For information about the corrections in this release, refer to the release notes.

This release also adds support for Red Hat Enterprise Linux 8, in addition to the previously supported platforms detailed in the 2018.1 Supported Platforms document.

 The build number for this release is 2018.1.3.414.0

0
0 707
Question Arto Alatalo · Nov 1, 2019

All of the sudden, Cache Studio's Debug->Run command started to fail with error '6704 Target has exited debugger' (German: Kein Anbinden möglich). What could be a reason of that? Today we installed Cache Web Terminal (https://intersystems-community.github.io/webterminal/
), could it be possible that the terminal somehow hijacked some debugging api end-point?

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2

Update: any idea what error 6704 means exactly? Studio was able to launch debugging job but it unexpectedly exited? German text seems is trying to say "Can't connect"

5
0 543
Article Jean Millette · Nov 2, 2019 15m read

The Issue

I help support a legacy ZEN application that makes extensive use of the “dataGrid” component. The application reuses a ZEN page with a“dataGrid” for different views of similar data; depending on the view, the application hides or displays some of the columns of the “dataGrid”. The application does this client-side, setting the “hidden” property of the “columnDescriptor” true or false as needed.

0
0 467
Question Yunier Gonzalez · Oct 31, 2019

Greetings community. I would like to know how to migrate a BD in production to a local environment. When I have a system in production (BD Sql Server) what we do is mount a local copy to do the analysis with the data and not occupy resources of the system in production. My question is: How do you do it with Intersystems technology? I already tested the PowerBi connector and it looks great, but that's where the question came up.
 

2
0 359
Question Jude Mukkadayil · Oct 29, 2019

Hi,

     I am trying to update an year on a date field in a cache database table but it showing an error message. But the functions are working on select query. The query I used is 

update RB_ResEffDateSessPayorRestr SET RESTR_DATETo = DATEADD(YYYY,1,RESTR_DATETo) where YEAR(RESTR_DATETo)=2020

I tried to update only the year which are 2020.

Can anyone please help me, Is there any error in the query?

Thanks

12
0 489
Question Sachin Verma · Oct 3, 2019

Hi All,

We have a licensed version of Ensemble but for now, we use only the DB capabilities of Cache. As we create a custom Namespace, for e.g "Test", a new Ensemble Namespace is automically created by the system --"TestENS".

Is there any way where we can identify the system created ENS namespaces ?

2
0 396
Question Sergey Madiev · Oct 30, 2019

Hi guys,
I ran into a strange (for me) situation, when I run same query but change the WHERE clause the plan is different and is not connected to the additional condition.
Query that doesn't use the necessary index:

9
0 698
Question Marcio Coelho · Oct 29, 2019

Hi all....

I couldn't find documentation on how to create a blob using the cache JDBC driver.
I found only one reading example:


https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…

The createBlob Method of the connection class was not implemented:

https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…
 

Does anyone know how to create a blob without compromising the java heap space?

7
0 466
Article John Murray · Oct 25, 2019 1m read

When dealing with a support issue of one of our Deltanji source control sites this week I learned that if you're using InterSystems versions earlier than 2018.1 on Unix-type platforms it's possible that a class you export in UDL format will subsequently fail to import. So I'm posting this information here in case it helps other folk.

0
0 311
Question Ahncel Lalu · Oct 25, 2019

When calling the below stored procedure using the management portal (Run Query) no data is being retrieve, but if it is directly executed management portal data will show.

"IN" does not work changing it to "=", "like" the stored procedure will work. Does any one know how to fix this ?

Pass values to code is  'AB','TS','SK','GM'

Query LoadData(code As %Library.String) As %SQLQuery [ SqlProc ]
{

SELECT STRING(Descrtiption,' (',Code,')') as Description,Code FROM Test.Codes 
WHERE Code  IN  (:portCode)
}

1
0 654
Article Zenkov Artem · Oct 18, 2019 2m read

Hello everyone,

I want to introduce you my project.

There was a common task in my work to create documents, in which I need insert some information about person: full name, birth date, address and etc. I wrote the application to do it in the simplest way.

The idea is not brand new and was implemented in other languages. I wanted to make a similar tool for Cache Object Script. The concept is following.

You create a template document in LibreOffice or Microsoft Word using special semantics.

2
1 751