#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Maks Atygaev · Nov 23, 2017

Dear community!

What do you think about webinar "Declarative programming on COS"? I want to do such one.

I am going to tell about main points of declarative programming and how you can implement it in your real projects.

Please feel free to write your opinion here.

Please if you wish to become a member of such webinar write me a message to atygaev.mi@gmail.com with subject "webinar".

1
0 296
Article Danny Wijnschenk · Nov 22, 2017 5m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…


The goal of today's challenge is to copy data from one disk to another, problem is that the disks are not directly connected. Luckily they are in a huge grid, and you have to find a way to copy the data through adjacents disks, while honoring the disk usage (you cannot copy to a disk where data is already stored).


The input is a df-like disk usage listing.

0
0 674
Question Mike Kadow · Nov 15, 2017

Hello, this is going to be a stupid question, yea I know, there are no stupid questions.

Say, I have an Object Property, Name or Count or Title, or whatever.

How can I get a list, or find out all the different ways it can be expressed?

Example:

-Property Name As %Name;

-Property Name As %String="me"

-Property Name As %String [ Required];

But what other parameters, keywords, restrictions, lists, etc. that I can apply to this Property?

I have been search the I/S documentation and so far at least, I cannot find that sort of information, or in one place.

5
0 615
Article Danny Wijnschenk · Nov 21, 2017 5m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
 

The challenge of day 21 is about scrambling passwords.

There are a few functions you need to implement that will do operations on a string :

0
0 487
Question Marco Blom · Nov 21, 2017

Hello Community,

I have a simple question but somehow hard to find the solution:

this is a property in my class:

Property RelationAID As ZenCrm.Relationtypes;

this is my method to save:

ClassMethod PopulateMatrix(tvar1, tvar2) As %Status
{
set RelationMatrix=##class(ZenCrm.RelationMatrix).%New()
set RelationMatrix.RelationAID= tvar1
set RelationMatrix.RelationAType= tvar2
do RelationMatrix.%Save()
quit $$$OK
}

However the 'set' line does not work for the 'related properties.

I have tried: set RelationMatrix.Relationtypes.RelationAID but this failed.

Any suggestion? thanks!

2
0 513
Question Wendy Griffiths · Nov 21, 2017

We have an web application accessed using https, that uses CSP technology with frames.

The initial 'login' is via a single CSP page, which then redirects to another CSP page which creates the frames (4 in all) and loads a CSP page in each of those.  For the most part the frames load without error, but sometimes when logging in and sometimes while using the system ' 5916 Illegal CSP Request ' errors occur.

I say 'login' in inverted commas as a Cache login is not performed just an application login, I don't know if that's relevant so thought I'd mention it.

2
0 812
Question wx fg · Nov 20, 2017

I have restored one database from backup, but when I query from some of tables,   prompt error :

this error remain after restart Caché service

I can skip this error with %nolock in select query.

My question is: 

1. why there were locks after restart service?

2. Can I release/rollback these locks by sql so I can query without %nolock?

3
0 624
Question P Patz · Nov 19, 2017

I have a query that I am attempting to run, but inner query is being rolled up into the overall query - per the optimizer (and jobexam observation).  While I know that if the inner query runs first, I will eliminate a number of records (making the result set smaller, and return quicker).

Just an example of what I am attempting to do:

8
0 537
Article Danny Wijnschenk · Nov 20, 2017 3m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

We are almost there : after this challenge, only 5 days left till the end of this advent of code (I cannot wait to get my life back !) .

The challenge of day 20 is about a list of integer ranges. Some ranges overlap,  but there are also values that are outside any range.

You have to find out what is the lowest integer that is outside any range.
 

0
0 435
Article Danny Wijnschenk · Nov 19, 2017 3m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

Today's challenge is a variation on the White Elephant gift exchange (https://en.wikipedia.org/wiki/White_elephant_gift_exchange), in this case, by a bunch of Elves where only one can have all gifts.

0
0 536
Article Danny Wijnschenk · Nov 18, 2017 4m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

You walk into a room, step on a tile and hear a loud click...

Traps !

The challenge is about avoiding traps.

You can recognise if a tile is a trap by following scheme :

0
0 295
Article Danny Wijnschenk · Nov 17, 2017 4m read

#########
#S| | | #
#-#-#-#-#
# | | | #
#-#-#-#-#
# | | | #
#-#-#-#-#
# | | |  
####### V

<!--break-->

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…


The challenge today is again a-maze-ing (as a wellknown president would say).

0
0 458
Question Mike Northrop · Nov 16, 2017

I'm trying to write a method to Export SQL Privileges from an instance by namespace, user, or roles. I've found two classes that might work:

  • ##class(Security.Users).Export
  • ##class(Security.SQLPrivileges).Export

One (Security.Users) exports an XML file and the other (Security.SQLPrivileges) exports an SQL file.

Neither of these options allows me to specify specific users or roles to export so I'll have to use them in tandem with something else. Is there something else that I should be using or do I need to find a way to filter on the backend with regular expressions or the like?

6
0 552
Article Danny Wijnschenk · Nov 16, 2017 6m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

The challenge of day 16 is about generating random data using a modified version of a dragon curve (you can find more info on fractal curves like Dragon here : https://en.wikipedia.org/wiki/Dragon_curve).

First you need to generate data in a loop as follows :

0
0 395
Question Kevin Furze · Nov 15, 2017

I'm looking for information, suggestions, video (courses) on make a lot more use of the documatic system already built into Cache,

Probably talked of before within this forum, but after an hour or two of searching, can't find the articles that I mmay have seen before.

I want to do a lot more documenting of my installation, we use and actively comment classes and methods, but I want to take it further by actually documenting the "why" and high level "how" my system works. Documatic seems a good place to put that knowledge.

6
0 566
Question Brian Downing · Nov 15, 2017

Can anyone suggest suitable Cache ObjectScript syntax for open/use/read statements on a simple ms-dos text file.
I've tried various examples seen on the web but they appear to be implementation specific.
I used MSM MUMPS many years ago but am now retired & would like to write a few simple routines for my own amusement & mental challenge.
I am using the free Version of Cache (V 2017.1) on my Windows 10 PC. The installation file was CachePCkit_x64.exe
My apologies for this query being very basic.

4
0 1114
Question Victor Li · Nov 12, 2017

Hello Caché Guru,

I'm new to Cache system. I'm trying to do something like saving meta data in Relational DB:

I could use "management portal" -> System Explorer->SQL to view individual table's catalog details or print out the column definition. However I need to gather those information for several hundreds of tables in the DB. Is there a way to do it using command line in kind of batching mode?

Any hint and tip is very much appreciated!

Thanks in advance!

Victor

3
0 726
Question barry dellinger · Nov 8, 2017

I am using Cache FTP classes to download from a FTP site files, that include zip files.

I can retrieve the whole file into a stream, but it contains a lot garbage.

Sample:

PKvªZK!—XÃ×$¯²4rNDDF Plus DB/Counseling Messages/CMM 1.0/RCMMD0_DESCNUnNUCX4NDDF Plus DB/Counseling Messages/CMM 1.0/RCMMD0_DESC´½[“ÛH’.ø¾fûð²ê*›¬ï—Q[›©n]²î®Ò–ª§Ï>‚$Hbؑ)ÊâÇ÷Ï=¸P™9gmlª•„‡.~ý|4Íñ)>$Uôîòäú6K“2Jó(ù¼MªŠþ2»¢J*ócåÅ%ºÄIt*JúO²K·iž˜Ë1Σ´ŠÊd[œNI¾Kvÿ÷ÿ5&faìÛ]|Nñçh_”Ñö˜f»2ÉMg4A´KiÜ%ÙE›+Qo/Ei~-d0VQl˜s ;­¢š¦)£ñ$º–˜lj>]xL|‰Ê¢8E—ätNÊøR—‰‰ŸxdI¿V4iz8^^Dþ3óþ±Hwî©«h[ä—8ÍÓüUñ)1ô’.&ùå›ê[¥..GºK7Æxcè
 

4
0 1636