#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Marek Bernád · Aug 11, 2017

Good day,

I need to find out if it is possible somehow to receive actual linux TIMESTAMP for example with $NOW() or other functions.
I was trying to recalculate it with $NOW() function, but without success. I would like to simulate Redis TIME command in COS.

My tryings:

USER > set time = $NOW()

USER > w (($PIECE(time,",",1)*86399) + $PIECE(time,",",2))
5573319043.403186

But in Redis it is:

> time
​1) 1502471158

On web page: http://try.redis.io/
type "time" + enter. And it will results as short documentation says: https://redis.io/commands/time

And this behavior I would like to implement in COS.

7
0 761
Question Ruslan K · Aug 9, 2017

I have a tablePane. TablePane can have one, or two, or three parameters. It depends on some conditions.

At first I add all three parameters to tablePane.

set p1 = ##class(%ZEN.Auxiliary.parameter).%New()
set p1 .id = ..id1
do table.parameters.Insert(p1 )
do %page.%AddComponent(p1 )

set p2 = ##class(%ZEN.Auxiliary.parameter).%New()
set p2 .id = ..id2
do table.parameters.Insert(p2 )
do %page.%AddComponent(p2 )

set p3 = ##class(%ZEN.Auxiliary.parameter).%New()
set p3 .id = ..id3
do table.parameters.Insert(p3 )
do %page.%AddComponent(p3 )

Then through javascript I set parameters values and query names.

2
0 366
Question Mike Kadow · Aug 10, 2017

Hi, I am trying to understand the transformational methods.

  • LogicalToDisplay()
  • LogicalToOdbc()
  • OdbcToLogical()
  • DisplayToDisplay()

I have created a small class with the only property of List as %List, see below.

Class LastName.Demo2 Extends %Persistent
{
Property List As %List;

}
Then I entered the following commands in the Terminal

Set Oref=##class(LastName.Demo2).%New()

FOR I=1:1:5 S $LI(List,I)="Value="_I

Set Oref.List=List

WRITE Oref.ListLogicalToDisplay(Oref.List)

^

<METHOD DOES NOT EXIST> *ListLogicalToDisplay,LastName.Demo2

zw Oref

Oref=<OBJECT REFERENCE>[2@LastName.Demo2]

5
0 881
Question Mike Kadow · Aug 9, 2017

The data type %Char or %Library.Char

The description says it is a fixed length character field.

How do I set the fixed length?

Or by just setting %Char to something, does that automatically define its length?

Are the parameters MINLEN, MAXLEN involved? Or are these the way I set the fixed length?

Any help with this?

4
0 405
Article Robert Cemper · Aug 8, 2017 1m read

In a previous exercise, I was able to show the power of Caché.
A medium-designed set of interdependent tables with some GB of data.
URLs cross reference over some million pages resulting in ~3 billion records

Competition was between

  • Caché
  • PostgreSQL
  • MySQL

Criteria were Speed + Storage consumption
I composed  a customized loader fed over a "raw" TCP connection
Mapping the "objects" into the final table by directly writing to Global Storage.,

3
0 881
Question Tom Philippi · Aug 7, 2017

Okay, so I ran into a rather odd bug. I have a remote test machine (tst-intersystems) running for which I accidently opened a lot of windows in my Studio (i.e. 500+). The result is that the studio runs out of memory and crashes. Now, every time I try to connect to this remote machine studio immediately attempts to open all windows effectively not allowing me to start studio anymore.

2
0 751
Article Fabian Haupt · Aug 3, 2017 3m read

In this short article we talk about how to get Yape running in a docker container to avoid having to setup python on your machine.

It's been a while since the last article in this series, so let's recap quickly.

We talked about using matplotlib to create a basic graph. Afterwards we introduced dynamic graphs using bokeh. In the 3rd part we talked about generating heatmaps using monlbl data.

1
1 1145
Article Robert Cemper · Aug 5, 2017 3m read

GIS stands for Geographic Information System.
  and it's not a typical arena for Caché. But it's definitely an environment with high data volume.
You see 3 major areas

- Visual front end:
   A mature area well covered by a bunch of commercial and open source products.
   No need for Caché there.

- GIS mathematics:  
  JTS (Java Topology Suite)  is fixed standard that covers all requirements and can be linked to Caché by the Java Gateway
or the C, C++ incarnation of this standard library using Caché Call Out Gateway.
  So far no added value by Caché.

4
0 873
Question Ruslan K · Aug 5, 2017

I don't know what a problem with my cache cube terminal, but cyrillic text is not displayed correctly.

I have some terminal program with cyrillic menus, dialogs and other text and all those items are displayed wrong (unknown symbols like on the image).

How can I solve this problem?

1
0 473
Question Jiri Svoboda · Aug 3, 2017

Hi community,

I have some constants hardcoded in my class as parameter values, and those constants are referenced in many places in my module. Now the need has arisen to provide different value for those parameters depending on some context. Is it possible to create some sort of accessor method for the parameter (like it is possible for properties), or do I need to perform a thorough refactoring?

Thanks.

Jiri

1
0 433
Question BRAD ANDERSON · Jul 31, 2017

Have very little XML experience and have been able to manually create output. Have a need to take data that I store in a M global (example: ^TML("HDATA", ) and out put it in CCDA XML format.

Are there any examples of M code using the XMLWriter to accomplish this?

Or can anyone provide some guidance 

Any help would be greatly appreciated.

2
0 752
Question Thiago Zenaro · Jul 27, 2017

Hi,

How can I read the stack of another process?

I know about ^JOBEXAM, but I only know how to use through terminal, and I need to get a string, or at least do a method that returns me a string

For example:

I have process A and B

B monitors process A at each second.

B logs information about process A in a table

Informations about lock I get through %SYS.LockQuery and the process through %SYS.Process

How can I get stack of process A from process B to log in the table?

Cache 2015.2.1

Thanks

2
0 608
Question Marek Bernád · Jul 28, 2017

Good day,

I would like to know how to detect in Caché ObjectScript if data saved in string is number and furthermore, if it's type is integer.

I maybe found a solution:
 

set value = "44.2d3"

try{
     set status = $INUMBER(value,"")
     if ('$FIND(+value,".")){
          w "your variable: '"_value_"' is number and integer"
     }else{
          w "variable is number but no integer"
     }
}catch(e){
     w "variable is not number" 
}


But I don't know how to do it correctly or if there exist better solution in COS (or maybe my solution is incorrect).

Thanks in advance for answers.

10
0 2134