#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Edit
Article Gevorg Arutiunian · Jul 13, 2018 1m read

This code snippet uses GZIP to compress and decompress a file in the file system. Change default file paths to customize code to compress/decompress your files:

Class objectscript.GZIP Extends %RegisteredObject
{
	classmethod test() {
		//Export Global(s) uncompressed
		set filename="C:\Temp\myglobal.xml"
		do $System.OBJ.Export("^oddEXTR.gbl",filename)
		//Open exported Globals
		set uncompressed = ##class(%FileBinaryStream).%New()
		set uncompressed.Filename=filename
		Set compressed = "C:\temp\mycomglobal.xml"
		//Open File Device over Gzip and Copy Uncompressed information to it
		Open compressed:("WUNK":::/GZIP=1:/NOXY=1:/OBUFSIZE=32768):0
		Use compressed
		do uncompressed.OutputToDevice()
		close compressed
		//Create New File  
		set out = ##class(%FileBinaryStream).%New()
		set out.Filename= "C:\Temp\decomp.xml"
		//Open compressed File and save information uncompressed over gzip
		Set file=##class(%File).%New(compressed)
		Do file.Open("RUK:::/GZIP=1:/NOXY=1")
		while ' file.AtEnd
		{
		    set line = file.ReadLine()
		    do out.Write(line)
		}
		do out.%Save()
	}
}

GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/cls/objectscript/GZIP.cls

0
0 0
Question Laura Cavanaugh · Jul 12, 2018

I have a class that has a property calledTags (like DescriptiveWords, but tags), where multiple tags are possible.  I am trying to decide on list of Objects vs. array of Objects.

Based on this post: https://community.intersystems.com/post/querying-list-property-sql, sounds like using an array of Objects is the better way to go. Indeed, I already noticed that it's not possible to have duplicates when using an array of Objects.

However, I am unable to make my queries on the array of Object use an index.  

4
0 974
Edit
Question Stuart Byrne · Jul 11, 2018

Hello,

I'm just re-going through the Caché foundations course exercises using a copy of Try-Caché on my home pc.

I'm trying to create a web application to receive REST calls however, when I use the Restlet client I get no response.

My web application config is:

0
0 0
Question Manish Valecha · Jul 10, 2018

Hi I am getting below error in xDBC error log

<-400>:<Fatal error occurred> <READ>Dispatch+14^%SYS.BINDSRV ServerLoop

When I check the detail of error I am getting below information. Please suggest as our schedule job getting failed due to same error.

2
0 544
Question Jay Ayliff · Jul 9, 2018

I'm trying write a JavaScript generator to perform pattern match validations using existing pattern match expressions in a legacy application.

I could make a server call to perform the pattern match operation but is there a way to automatically translate the pattern match expressions into RegEx expressions so I can perform the operation in JavaScript on the client to save making an Ajax call back to the server?

Thanks

Jay Ayliff

M-Tech

2
0 570
Question Pradip Patoliya · Jul 7, 2018

I am trying to fetch the data from cache database. But i got the error like "CSP application closed the connection before sending a responce".

Below is the query.

SELECT
CallbackComment
FROM SQ.CBPhoneResult_View Where PhoneDateODBC = '2018-04-09'

I have investigated and found that "CallbackComment" contains the special character single quotes " ' "  for one result and due to this i got this error.

In this field data is enter by customer. so we cannot restrict them like Do Not use single quotes.

Please provide some solution as soon as possible.

Thanks in advance. 

30
0 1835
Question Tony Beltz · Jun 29, 2018

Lost the raid array on our server. We were able to recovery all the data from backup but now are running into road blocks getting the Cache database up and running. We are running version 5.0.7 which is quite old but works for our needs. Our most current road block it is getting CTTerm (Telnet) to connect with the database. After entering the user and password nothing happens beside the carriage return dropping down one more line in CTTerm.  If you are familiar with the older revs of Cache please feel free to contact me or provide input.  Any help or direction would be invaluable to us. RAM

2
0 509
Question Davidson Espindola · Jun 21, 2018

Hello everyone

I have a problem with $ ZF (-1)

I need to delete file from windows folder example c: \ sys \ text.txt, when executing the w $ zf (-1, "c: \ sys \ text.txt") command, the file does not delete.
There is some other cache command that performs this task.

hugs

Davidson

8
0 1271
Question Chris Bransden · Jul 4, 2018

Hi, I found some issues with $ZF(-100) whilst replacing our old $ZF(-1) calls following the security alert. They're easy enough to work around, just figured it might be useful to someone :)

 

There seems to be some inconsistency with how $ZF(-100) is functioning between Unix and Win, contrary to the documentation. For example, for a simple ‘output directory listing to file’  operation:

 

Windows:

set dev="dir.txt"

set com="dir"

set options(1)=""

set options(2)="e:\nbupg\webserver\"

w $ZF(-100,"/SHELL /STDERR=""NUL"" /STDOUT="_dev,com,.options)

 

Expected result (output of dir e:\nbupg\webserver\):

5
0 1361
Question Dineshkumar Muniyasamy · Jun 20, 2018

Hi All,

On button click from my zen page am calling the $System.SQL.ShowPlan() to calculate the cost of the SQL query.

In Cache` 2016.2 I faced a problem , when the logged in user didn't have the %development resource(<PROTECT> error).

But in Cache` 2017.2 it's working without the %development resource.

Is there any changes done on this area in the versions above 2016.2.

Thanks,

Dinesh

2
0 344
Question CM Wang · Aug 16, 2017

I try to run below two statements

Set tRS = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:SubclassOf")
​set tSC = tRS.Execute("%Persistent")

and I always get <PROTECT>check+5^%Dictionary.ClassDefinitionQuery.1

The login user is _SYSTEM and should have all the permissions.

I cannot run queries in the $SYSTEM.SQL.Shell(). I would get <PROTECT>%GenerateMetadata+16^%SQL.StatementMetadata.1

However, when I run the query through SMP, everything is fine.

Any idea where could I start to investigate ?

Thanks.

5
0 3192
Article Chris Stewart · Apr 21, 2017 3m read

or "Didn't you say you would cover Persistent Objects in Part 5, Chris?"

Yes, that was the plan.  This is a pretty important topic, so it get's its own Article

Up until now, we've display widget JSON that has been created by a basic loop.  Clearly this isn't of much value.  Now we have our stack connected together, and we can see that the data is flowing to the Welcome page, it's time to complete the stack and start feeding our service from "real" data.

4
0 1675
Question Shavkat Shamukhamedov · Aug 2, 2016

I cannot connect to Cache from node.js  

I have installed in Windows 10 the following: CACHE 2016, node.js v 4.4.7 and  express .

-  where can I get cache.node? The link in the Intersystmes documentation  http://globalsdb.org/downloads/  doesn't work. I found cache0100.node and cache0120.node  in my Cache instance's  \bin directory. But I am not sure if I can use them or not.

 - how to install cache.node ? Where do I place it exactly? 

Can anyone recommend any tutorial or code example with installation instructions?

Thank you!

12
1 3641
Question Minsu Kim · Jul 4, 2018

Hello Global masters,

I have some question about How can I connect C# to Cache Object without VisM?

I am always using VisM when I want to connect C# to Cache Object becouse I learn it from my co-worker .

but When I asked something in here about Cache Object and someone worte "don't use VisM because it is old thing" like that.

So I want to know about that

Thank you

Minsu.

1
0 418
Question Maryanne Martin · Jul 3, 2018

New to Cache/Studio. Just installed Client option for Cache (cube).

Attempting login to Management Portal for dev/tst/prd environments yields ERROR #822.

Any suggestions on where to begin to resolve would be appreciated.

Thanks!

4
0 2771
InterSystems Official Steve Brunner · Jul 3, 2018

InterSystems is pleased to announce the availability of Caché and Ensemble 2017.2.2

There are many corrections in these releases.  Please find a full list of the corrections in the release notes.

The version number of the kits is 2017.2.2.865.0.

The list of platforms is the same as for 2017.2.1.  For complete platform details please refer to the 2017.2 Supported Platforms document.

HealthShare Health Connect based on Ensemble 2017.2.2 is not yet available, but will be announced soon.

0
0 856
Question Paster-Bachar Gadi · Jun 28, 2018

Hi DC,

I'm looking for some creative outside-the-box thinking and gaudiness.
I have a device that send its data in UDP Multicast.

I need to parse this data and send it to an outside SQL table (sql outbound adapter)
I planned on a udp inbound adapter but apparently it is not operable.

Can anyone direct me to a thought on how to grab the data and send it to my future process?

I have thoughts on scripts that capture the data to file and then I will use the file inbound adapter, or maybe in some way, forward the UDP, packet to a TCP one (don’t know if possible)  and then use the TCP inbound adapter…

3
0 512
Question Stephen Wilson · Aug 8, 2017

I came across this behaviour when debugging some Cache ObjectScript code.  I have provided a simple example below.

Example 1:

START
 ZBREAK /TRACE:ON:"C:/temp/zbreak_trace.log"
 ZBREAK *VAR1:"T"
 ZBREAK *VAR2:"T"
 ZBREAK *VAR3:"T"
 Set (VAR1,VAR2,VAR3)=""
 Kill VAR1,VAR2,VAR3
 Quit

Trace Output:

Trace: ZBREAK SET VAR3="" at START+5^TRACE

Trace: ZBREAK KILL VAR1 at START+6^TRACE

Trace: ZBREAK KILL VAR2 at START+6^TRACE

Trace: ZBREAK KILL VAR3 at START+6^TRACE

$ZV value:

Cache for Windows (x86-32) 2017.1 (Build 792) Mon Mar 20 2017 20:20:07 EDT
3
1 419
Question Christopher Henson · Jul 2, 2018

I am working on a TrakCare JIRA issue that requires accessing class properties in a different installation of TrakCare on another machine. For instance, I need to compare the deprecated items in the current version of TrakCare to the deprecated items in a previous release. Is there anything in the built in classes that will allow me to do this, or  is it something I'll need to do with a SQL stored procedure or something else I haven't thought of?

2
0 357
Question Rodrigo Flores · Jun 28, 2018

Hi,


is there way when select a value in filter column and the second column filter use only value referred to the first selection??

we use to active filter to column in table, but not know how relationship the filter between columns of table.

only in the table context in zen page.

1
0 357