#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Scott Roth · Apr 19, 2017

Awhile back we had someone write some code to Log messages like we did in eGate but with Ensemble.

ClassMethod LogIt(pComponent As %String, pMsgIn As %String)
{
 set vDIR="/ensemble/"_^OSUWMCInstance_"/logs/"
 set fs=##class(%Stream.FileCharacter).%New()
 set fs.Filename=vDIR_pComponent_".log"
 do fs.MoveToEnd()
 set vTM=$PIECE($ZDATETIME($HOROLOG)," ",2)
 //$ZTIME($PIECE($H,",",2),1)
 do fs.WriteLine(vTM_" : "_pMsgIn)
 do fs.%Save()
 set fs = "" // Close file
}

2
0 1497
Question Константин Ерёмин · Apr 20, 2017

Hi All,

I use SQL function JSON_OBJECT to get data as a JSON object.

However, sometimes I get error with function JSON_OBJECT when values contain [, ], { or }.

Error:

[SQLCODE: <-400>:<Fatal error occurred>]

Unexpected error occurred in JSON_OBJECT() function execution of <JSON_OBJECT>.%FromJSON().Parsing error

For example,

Query: SELECT JSON_OBJECT('idSQL':id, 'content':content) FROM DocBook.block

For demonstration, I used Management Portal, System Explorer – SQL, Execute Query

This text was in Content:

9
0 1515
Article John Murray · Feb 14, 2017 1m read

If you are developing applications that use CSP or Zen, or potentially any of the other InterSystems web-related stuff that's built on top of CSP, then it's important to know how to keep one particular secret.

A central part of the CSP security architecture is a server-side session key. "Server-side" because its value should never be revealed to the client that is issuing the web requests. If it is revealed, a malicious client might be able to use it to bypass your security and make your server do things you don't want it to.

1
0 739
Question prabakaran a · Apr 20, 2017

Hi All,

         We can sent the file to FTP server using CMD prompt.

         When trying send file using cache FTP. it automatically logged out.

          While cache FTP access (read/write) FTP server it automatically logged out.

CODE:

1
0 853
InterSystems Official Steve Brunner · Apr 19, 2017

InterSystems is pleased to announce the availability of the following maintenance releases:

  • Caché and Ensemble 2016.2.2
  • HealthShare Health Connect v15.021 on two core technology releases, 2016.2.2 and 2017.1.0

Caché and Ensemble 2016.2.2 are available on the same platforms as 2016.2.1

0
0 576
Article Fabian Haupt · Apr 19, 2017 2m read

Code coverage and performance optimization of code has come up a bunch of times already, so most of you should already be aware of the SYS.MONLBL utility. Often a visual approach to looking at code is much more intuitive than pure numbers, which is pretty much the whole point of this article series. This time we will take a slight excursion away from python and its tools and are going to explore generating heatmaps from ^%SYS.MONLBL reports.

0
1 676
Question Chris Bransden · Apr 19, 2017

Hi!

I'm trying to insert a relationship from a parent object instance to a child object instnace programmatically. Ie, i want to do:

Do parentObject.childRefProperty.Insert(chilDobject)

where childRefProperty is defined by a string. I feel this should be achievable with $PROPERTY and/or $METHOD or maybe something in $SYSTEM.OBJ.*, but can't quite figure it out. Anyone know?

Cheers :)

Chris

3
0 316
Article Chris Stewart · Apr 19, 2017 3m read

We finished our last lesson with our Widgets Direct page receiving a Welcome message as a property of a JSON object, which was unpacked and displayed on the page. However, we are on Lesson 3, and we still haven't had any talk of displaying widgets yet.  

Let's change that.  Widgets Direct are a leader in widget and widget accessories, so we clearly have numerous items to display.   To transfer this, we will need to declare and return our first array.  Let's go back to our REST.Dispatch class, and add this data to our Service.

0
0 1972
Question Alexandr Ladoshkin · Apr 18, 2017

Hello,

I work with trigger and I need afeter update make INSERT into LogTable value of prorerty of saved class.  This is what i have in this monent.

S className = ..%ClassName(1)
S cls=##class(%Dictionary.CompiledClass).%OpenId(className)
F i = 1:1:cls.Properties.Count() {
    S prop = cls.Properties.GetAt(i)
    S propName = prop.Name
    S value={propName*N}
}

How Can I get value given "prop".

Thank you

8
0 693
Question Alexandr Ladoshkin · Apr 17, 2017

Hello everyone.

I have some issue with trigger. I have class where I defined 3 triggers (UPDATE, INSERT, DELETE). These triggers are Foreach = row/object. In my currently task, I need overide this triggers in children class.  is It possible to do it? 

Thank you for your help.

4
0 421
Article Brendan Bannon · Oct 27, 2016 2m read

New WRC Customer Interface

Come check out the new WRC interface we have made available to supported customer. 

Some of the new features available to you are:

                Organization Dashboard – gives an overview of your organizations activity for this year

                Bug / Enhancement (prodlog) History – you can now look at all the prodlogs your organization has entered.  This table will show you the current status, planned version the fix should be in and the correction key for prodlogs that are fixed.

9
0 1217
Article John Murray · Apr 13, 2017 1m read

I only recently noticed the presence of a local database named CACHE alongside the more familiar CACHESYS, CACHELIB, CACHETEMP and CACHEAUDIT.

A bit of digging through the documentation archive led me to conclude that the CACHE database arrived in 2010.2, where the release notes say:

 

Note the lack of an accent on the words I have highlighted.

1
0 580
Article Kyle Baxter · Apr 12, 2017 1m read

 It's almost time to get your customers upgraded to new versions - are you worried about showing off your SQL Performance after upgrades?  If you want to upgrade without worrying, then I have just the program for you!!!  Check out this video from Global Summit 2016 featuring yours truly explaining how to upgrade a system without worrying about pesky SQL queries showing on your waistline!  

https://www.youtube.com/watch?v=GfFPYfIoR_g

Unfortunately the video started after the Frozen Musical Sing-a-long, but it's 30 minutes of the most fun you'll have while learning tools and tips for Caché SQL!

0
0 387
Question Arto Alatalo · Apr 11, 2017

I have classes A and B, B derived from A, A has method Abc.

From INT of class B I see that compiler copies implementation of Abc to class B, so that Abc exists both in A and B.

As result, when B invokes Abs, B.Abs() is executed instead of A.Abs(). In result debuger is not able to step into Abs and breakpoints in A.Abs never hit.

Why this happens and how can I avoid this?

Update:

OK, now I know the reason: compiler makes the copy if Abc has this line:

cn=##Expression($$$quote(%classname))

21
0 521
Question Stella Ticker · Apr 11, 2017

There is a large file that needs to be processed, with over 500 000 rows. Each row needs to be verified for various data and then all the results collated and reported into a single report.  What is the most efficient way to do this? I tried calling the processing function with Job , where each function jobbed off would report results to a different node of a common global. But the jobbed functions are not updating their respective rows even though I am passing the global name and root node. What is the most efficient way to process this large file? Any Cache/Ensemble ideas are appreciated.

1
0 1302
Question Ivan Tioh · Apr 5, 2017

I have done Python - Cache binding setup following the guide from http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…. I have also run test.py from sample3 folder and it able to run and complete successfully.

However, when I try to run the same test.py code via $zf, it gives error with exit code 1.

I've tried running help("intersys.pythonbind3") via $zf and also running from Cache terminal as follows:

  1. $zf(-1,"C:\Python36\python <path>/script.py")
  2. ! C:\Python36\python <path>/script.py

which gives me the following output:

6
0 842