#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Question lw lw · Nov 14, 2019

My project need to  restore the previous part of the log,  and I use the rountine "^JRNRESTO" and filter.  After recovery completed,  the table structure is restored, but the table data is not restored, also unable to insert data into the table.

The filter is defined as follows:

ZJRNFILT(jid,dir,glo,type,restmode,addr,time)
 New zdh
 Set zdh=$zdatetimeh("11/14/2019 15:18:56")
 If $p(time,",",1)>$p(zdh,",",1) Set restmode=0 Quit
 If $p(time,",",1)<$p(zdh,",",1) Set restmode=1 Quit
 If $p(time,",",2)<$p(zdh,",",2) {
 Set restmode=1
 } Else {
 Set restmode=0
 } Quit

after restore the :

5
0 446
Question Yana Rchks · Oct 30, 2019

I am trying to make architecture for my project. And for it, it needs to make list property in which there is list of objects of another table, the data must be unique, therefore I make sql-query to check objects of another table if it is used or not, but I can't make sql-query to check elements in list in property with elements of another table. Can you help me? In property ID of object is used.

12
0 3320
Question Michael Davidovich · Nov 14, 2019

I'm playing with Cache web apps (CSP pages) and local dev . . .

My understanding is that when you run Cache, it spins up a very lightweight Apache web server with the web root C:\InterSystems\Cache\CSP (or where your CSP folder happens to be).  I can successfully place a index.html file with a simple header element in any one of the sub directories in \CSP (e.g. samples, sys, user) and it will successfully be served on, for example, http://localhost:57772/CSP/samples/index.html.

5
0 808
Job Amanda Duff · Nov 14, 2019

An exciting position has arisen for a Junior Application Support Analyst in an established support team. The role will suit candidates looking to enter, or are at the start of their career in, the software industry who want to provide good customer service, enjoy finding solutions for problems and are enthusiastic about software and technology. http://codas.com

Key Responsibilities

0
0 488
Question Hieu Dien Nguyen · Nov 29, 2018

Hello everyone,

I try excuting a SQL Query like this SELECT ID, CompanyName FROM Company WHERE CompanyName LIKE 'condition' 

But if I want to search CompanyName have special char %, ex: '100% Co' , 'Group of Mr.%', 'The %TaxProp'...

How can I take % to query, with  

SELECT ID, CompanyName FROM Table1 WHERE CompanyName LIKE '%%%' 

it'll get all record in table.

Someone give me an idea. Thanks so much!

5
0 998
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 1139
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 893
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 953
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 349
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 714
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 1090
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 286
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 779
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 472
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 378
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 486
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 688
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 684
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 516
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 440
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 348
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 466