#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question CM Wang · Jun 27, 2018

I am trying to read some binary data from a local file or through socket.

The binary data is like H.264 codec, I need to read data BYTE by BYTE (even BIT by BIT) and decide the next step based on the data read so far.

I check the documentation and it seems like most of the sample focus on human readable IO, ie: LINE by LINE.

Could I achieve my goal through COS?

Thanks. 

3
0 1491
Question David Crawford · Jun 18, 2018

I thought I should be able to go to the application error log or look at d ^%ER when I get the following error in the browser when troubleshooting a CSP page:

An error occurred with the CSP application and has been logged to system error log (^ERRORS)

However nothing is being generated in these logs. Where are these logs being made?

Thank you

9
1 2561
Question Virginia Rogers · Jun 26, 2018

Hello,

I need to add a new property ("Injection") to an existing database.  The existing database contains, in part:

An "ImageStudy" which contains one or more "ImageFiles"  defined as follows:

Class PET.ImageStudy Extends (%Persistent) 
{
Relationship ImageFiles as PET.ImageFile [cardinality=children,inverse=Study]
...
}
Class PET.ImageFile Extends (%Persistent)
Relationship Study as PET.ImageStudy [cardinality=parent,inverse=ImagFiles]
...
}
7
0 592
Question Eduard Lebedyuk · Jun 25, 2018

I have this local, containing a list of books of arbitrary length:

set books=2
set books(1, "author") = "Alice"
set books(1, "title") = "Hello"
set books(1, "pages") = "123"
set books(2, "author") = "Bob"
set books(2, "title") = "World"
set books(2, "pages") = "456"

And I want to generate this PDF (there could be more than two tables), each book is a separate table:

The header is always the same (Author, Title, Page) but the number of tables would be different.

ZEN reports sounds relevant, but I'm not sure how to pass data from local there and how to draw a separate table for each result.

3
0 973
Question Mack Altman · Jun 25, 2018

Typically, I have time to review the documentation, which I'm sure is here. However, I have a workaround (TEST1) but I was wondering if anyone could assist me in advising how I would need to adapt the curly brace snippet (TEST2) to provide the same result.

Thanks for any help you can provide.

TEST1(STATUS=1) K (STATUS)X "S MSG=$S(STATUS:""HELLO"", 1:""GOODBYE"")"W !,MSGQTEST2(STATUS=1) PUBLIC {X "S MSG=$S(STATUS:""HELLO"", 1:""GOODBYE"")"W !,MSG}
3
0 385
Question David Sterngast · Jun 20, 2018

When I down load a file using a csp page, the application  shows  the percentage as  37 %, 74 %, and 100 %.    I am trying to make changes to the application that it shows one percentage after each read.  The first time it reads, it would display 37%.   The next run would replace

37 %  with 74 % and so on until it completes its download.   I have tried adding javascript code to the application  however it doesn't work.   For example when I enter &js('alert');, the application displays it value on the screen.  Also, I tryed putting it between two scripts tags and it doesn't work.

4
0 1410
Question Nicky Zhu · Jun 22, 2018

Hi folks,

One of my clients want to project a null property of a cache object to an empty XML element. Say, if we have a class:

Class Diabetes.BS.Message.LabReportMessage Extends Ens.Request
{

Property Report As %String;

Property IsRisky As %Boolean;

Property RiskValue As %String ;

}

If the instance of this class has a null RiskValue, after projection, they want the XML as following:

<LabReportMessage>
                <Report>Somestring</Report>
                <IsRisky>1</IsRisky>
                <RiskValue/>
 </LabReportMessage>

Is there any way we can do it? Thanks.

1
0 978
Question Larry Faraci · Jun 18, 2018

I have a CACHE.DAT file that is working under CACHE version 2015.1.0.429.0

I have a second machine with CACHE version 2017.2.0.741.0

When I attempt to add/use the CACHE.DAT in the new version of CACHE, it will not mount.

How do I upgrade/convert the DAT file to make it work under the new CACHE version?

Thx. Larry...

7
0 964
Question Ben Spead · Jun 19, 2018

1) I have an oref pointing to an object on disk

2) I save the object which causes an UPDATE / AFTER Trigger to fire, and updates a value in an embedded object property

3)  I would like to see that new embedded property value in my in-memory object (for unit testing)

Is there a way to do this via a method call?  Or do I need to close the object and re-open it to see the updated value?

Thanks!

Ben

1
0 344
Edit
Article GUILHERME CRUZ DA CUNHA · Jun 18, 2018 2m read

For those who are interested, or want to do something different with the cache language, I leave here two codes of animations.

They serve to run on the terminal while executing a routine, or a method.

To escape the monotony of seeing that static code in the terminal.

Examples:

1 - 

2
0 25
Question Eduard Lebedyuk · Jun 18, 2018

Let's say I have a user-generated document template with placeholders and I want to replace them with actual values.

Values could be:

  • scalars
  • tables
  • ...?

So far I wrote a simple find/replace tool that works with RTF format (because it's not a binary format), here's how it works:

set template = "D:\Cache\RTF\template.rtf"
set var("%title") = "Hello"
set var("%table") = $lb("Utils.RTF", "TestFunc")
set result = "D:\Cache\RTF\out.rtf"
set sc = ##class(Utils.RTF).replace(template, .var, result)
2
0 442
Question Ben Spead · Jun 12, 2018

I have a serial object:

Class EmbedObj Extends %SerialObject

which is stored as a  property of another object

Class ContainerObj Extends %Persistent

Property InnerObj As EmbedObj;

Property Foobar As %String;

Question:

From within the context of an instance of EmbedObj, how can I navigate to the containing instance of "ContainterObj" and find that value of its Foobar property?

Harder Question:  Is there a way I can do this as part of SQLComputeCode? (my EmbedObj has a Calculated property which now needs to depend on the value of property Foobar of the containing object).

8
0 759
Question Jason Parker · Jun 17, 2018

Hello,

If this question is in the wrong section, I apologise.

Has anyone ever used Cache Object Script to connect to any hardware such as a sensor?

What I mean is this :-

Lets assume that code has been written in Cache Object Script where it can detect breaks in electrical connections.

2
0 328
Question Lewis Greitzer · Jun 14, 2018

I've set up a Ens.Alert routing rule and would like to route alerts to different email groups based on business partner or alert group instead of relying on source config using Document.SourceConfigName. Is there a way to reference the business partner or alert group property in a routing rule?

5
0 664
Edit
Article GUILHERME CRUZ DA CUNHA · Jun 15, 2018 2m read
    What is this talk? • Provocative • Conflicting • Irritating • For those who want to be professional • Driver What is this talk not? • Silver bullet • Only for devs Java • Only for devs • To be forgotten Debt technical or "how to prevent the conductor knock on your door" - Alexandre Freire https://www.infoq.com/br/presentations/divida-tecnica- need-credit Developers do not know fundamentals! http://s3.amazonaws.com/magoo/ABAAAfWwoAD-5.jpg bitly.com/resultadopesquisafusca bitly.com/pesquisafusca Developers do not know how to make simple software! Overengineering Developers do not
0
0 17
Question Roberto Cahanap · Jun 14, 2018

We are updating from 2015.1.1 to  2017.2. I am testing the Hot JVM functionality to see if our current functionality is working in the new version of 2017.

I am having a problem trying to make it "fail".

Generally if I put in an invalid renderport then I usually get an error. Now if I put in an invalid renderport it generates the PDF anyway (FOP).

Was there a change where if it fails using the renderserver then it will create a new instance of Java to produce the PDF?

3
0 367
Question Alex Kogan · Jun 14, 2018

Hello All,

I hope it's not a silly question. 

Here is my issue:
I have 3 simple classes:

Parent class, let's say:

Class ParentClass Extends %RegisteredObject
{
 Property a As %String;
}
 
and two children classes
Class A.Child Extends ParentClass
{
Property b As %String;
}

Class B.Child Extends ParentClass
{
Property c As %String;
}

So no issues - all compiles and seem to work.

But, when I add %XML.Adaptor to my parent class, so:

Class ParentClass Extends (%RegisteredObject, %XML.Adaptor)
{
 Property a As %String;

3
0 1291
Question Ruslan K · Jun 14, 2018

Is there a way to add event listener for a zen control?

I have a custom text control and I want to add 'change' event listener for it.

Is it possible to do not using 'onchange' property? 

3
0 496
Article Mark Bolinsky · Mar 18, 2016 9m read

++ Update: August 1, 2018

The use of the InterSystems Virtual IP (VIP) address built-in to Caché database mirroring has certain limitations. In particular, it can only be used when mirror members reside the same network subnet. When multiple data centers are used, network subnets are not often “stretched” beyond the physical data center due to added network complexity (more detailed discussion here). For similar reasons, Virtual IP is often not usable when the database is hosted in the cloud.

Network traffic management appliances such as load balancers (physical or virtual) can be used to achieve the same level of transparency, presenting a single address to the client applications or devices. The network traffic manager automatically redirects clients to the current mirror primary’s real IP address. The automation is intended to meet the needs of both HA failover and DR promotion following a disaster. 

12
6 6944
Question Thiago Zenaro · Jun 12, 2018

Hi community!
Is there any way to create new method keywords?
For example:

ClassMethod TestOne() [ MyKeyword = MyValue ]
{
    // Implementation
}

Another doubt (maybe another topic)
How can I generate new methods at compilation time for the same class?
I tried method generators, but It only gets compiled when I compile for the second time.
I also read this comment but I could not find out how to generate the methods and get them compiled in the first compilation.

For example:

Class util.Test
{

ClassMethod TestOne()
{
    Write 1
}

ClassMethod TestTwo()
{
    Write 1
}

}

Expected:

13
0 657