#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 im

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.

If there

2
0 367
Discussion Sebastian Mueller · Aug 8, 2017

I understand this is a rather broad topic (and at times involves religious sentiments) yet I would like to look at it from the Caché perspective:

  • Do you use an issue tracking / collaboration system? If so which one. Any you would recommend or immediately dismiss based on personal experience?
  • How do you keep track of large code bases? Thousdands of folders named backup1, backups2, ..., SVN, git?
  • Do you have a development server to which you commit and test features there, or do you rather run a local copy of caché and implement features locally first, then push to the server?
  • Bonus questi
14
0 962
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]

+----------------- general infor

5
0 883
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.,

Phase 1:  MySQL failed before reaching the 1st million records by it's
Incredible consumption of memory and disks space
Pase2:  Disk consumption of Pos

3
0 882
Question Eduard Lebedyuk · Aug 8, 2017

I have a Caché server with external apache.

It has a hostname, i.e.: http://myserver.com

There is an index page, which is available over http://myserver.com/index.html (/ is a Caché CSP app)

How can I make index.html available from http://myserver.com?

Here's the relevant parts of my apache config:

<Directory />
    CSP On
    DirectoryIndex index.html
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
<Location />
    DirectoryIndex index.html
    Options FollowSymLinks 
    AllowOverride All
    CSP On
    SetHandler csp-handler-sa
</Loc
3
0 903
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.

Now, apparently the windows I have opened in Studio are stored locally since I can just rename the tst-intersystems (via intersystems tray icon -> preferred server -> add/edi)t and then I can start the studio withou

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.

A common theme in the feedback I got over various channels was the difficulty setting up an environment to run any of these. So we decided to make it a bit easier and I teamed up with Murray to create a Doc

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é.

- the Database that holds all the geographic obj







wink

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 Stephen Wilson · Aug 3, 2017

I am running a ZBREAK trace on a legacy FDBMS application that uses arrays but rather than displaying the array value contents, I am seeing logs similar to the following.

Trace: ZBREAK SET LINE=Array Val at BIOPWR+6^BIOPWR

My ZBREAK trace settings are as follows: 

ZBREAK /TRACE:ON:"/somedir/trace1.log"
ZBREAK *LINE:"T"

The 'LINE' array has a single integer subscript and some string data. The subscript is sometimes calculated using arbitrary calculations such as S LINE(I-33)="BLAH BLAH BLAH". This makes the code very difficult to read and debug. Is there an easy way to replace the 'Array Val' in the


5
1 529
Question Rubens Silva · Aug 2, 2017

Hello.

I'm using device redirection to intercept incoming writes and need to figure a smart way to detect when to CLRF in order to prevent misleading outputs.
So basically, if the intercepted write ends with !, I need to know that and prevent my routine from writing ! as well.
Here's the source code for it:
 

ClassMethod Call(sourceControl As %Studio.Extension.Base,hookName As %String = "",parameters... As %String) As %Status [ Internal, ProcedureBlock = 0 ]{new sc, content, implementer, alreadyRedirected, isNewLineTerminator, currentMnemonicset sc = $$$OKset impleme
13
0 617
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 753
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 2135
Question Trung Vu · Jul 31, 2017

Hi everyone,

I am trying to build an application based on real-time streaming data. A back-end program is continually writing to the Cache database, and then the data from the Cache database is retrieved through a REST API by a front-end program. The REST API is static -- it just gives the front-end all the data in the database at the time it was called. The problem is that every time the Cache database is updated, I need to send the newly arrived data to the front-end, but with the static API, there is no way I can, (I can keep sending requests to the REST API, but that would be a waste of res

3
0 914