#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Anzelem Sanyatwe · Feb 19, 2020

Good Day;

looking at disabling Telnet - on Windows - Cache 2012,2017. The security scans don't need it on network.

But still leave users able to use `Terminal - direct - on the box should be fine.

am posting here for quick refs (as this is a common security vulnerability out there).

Regards;

Anzelem.

5
0 1029
Question Đặng Phú Lộc · Mar 19, 2020

Hi everyone,

I have a javascript function in *.js file. This function has to access to variable set by server.

I've tried setting the variable in *.js like this;

function dummy(){

var myText = '#(myText)#';

}

However it seems like the webserver doesn't understand this coding convention. The js file sent back to client set myText in dummy() with the hard-value #(myText)#. It's not the value of myText variable in server side.

I know I can achieve this by putting dummy() directly in csp file. However I have to put dummy() in separated file, so that other files can use it.

3
0 730
Question Ciaran Mooney · Mar 12, 2020

Hi All

When performing an update transaction on  patient data in GUI Apex 5.8 cache2017, we randomly get a ‘Database Connection Lost’ error. Subsequently the application quits and the incomplete transaction is rolled back.
 

We have confined its not a network issue as we can still query the database using CHUI Apex when these events occur.

so any input appreciated.

1
0 374
Article alex kosinets · Mar 17, 2020 2m read

The client part of the code for this game is on the MS Excel sheet and consists of:

  1. m-commands  for random arranging ships on the playing field  (21 cells)
  2. m-command to enable on-click m-trigger on all 100 cells of the playing field (1), red font
  3. m-trigger (1), red font

The server part of the code (vmx.ro) is installed onсе, it not change depending on the task, is the same for IRIS, CACHE, 16, 8-bit encoding, any applications, games, reports.  The server side creates and maintains ‘virtual excel’ in M.

0
0 606
Announcement Rubens Silva · Mar 16, 2020

Hello all!

As we ObjectScript developers have been experiencing, preparing an environment to run CI related tasks can be quite the chore. This is why I have been thinking about how we could improve this workflow and the result of that effort is IRIS-CI.

See how it works here.

Quickstart

1.Download the image from the Docker Hub registry:

docker pull rfns/iris-ci:0.5.3
  1. Run the container (with the default settings):
docker run --rm --name ci -t -v /path/to/your/app:/opt/ci/app rfns/iris-ci:0.5.3
0
1 447
Question Randall Hiser · Mar 13, 2020

I am attempting to pragmatically create a bunch of roles and then assign the appropriate resources to that role.

Currently, the only ways to add resources to a role are to:

1. Do through Management Portal

2. Go through ^SECURITY (add resource one at a time)

My Intention would be to do the following: do ^SECURITY Role Setup Edit Role When prompted for resources to add, be able to use *

2
0 354
Question just fig · Mar 14, 2020

i want to achive a function like that:

"1.2.3"   ->   tmp(1,2,3)=""

"1.2.3.4"   ->   tmp(1,2,3,4)=""

"1.2.3.4..."   ->   tmp(1,2,3,4,...)=""

thx :)

10
0 321
Article Alexey Maslov · Mar 16, 2020 5m read

Introduction

Despite the fact that InterSystems has long recommended using external backup tools, many users have opted to use the internal Online Backup facility, which is included in all distributions of InterSystems products (IRIS Data Platform, Caché, etc.). The reasons why are quite obvious:

0
2 541
Question Drew Holloway · Mar 12, 2020

Is there a way to query the database structure?  In SSMS there are queries for finding tables with a column with a certain name (using LIKE).  And there is the redgate tool SQL Search.  But I'm not sure how to go about looking for columns that have say a value of 'PATID' and returning all tables that match.  Does anyone know?

5
0 1800
Question Randall Hiser · Mar 13, 2020

Maybe I haven't seen anything about it in the documentation, but why isn't there a way to list all the Resources from the %SYS namespace from a class rather than through ^SECURITY

Thinking maybe something like this: 
##Class(Security.Resources).ListAll(.result)

1
0 346
Question Rubens Silva · Mar 9, 2020

Just like the title says, I'm attempting to find a way to create a web application that instead of serving CSP files, it uses a dispatch class.
I searched for clues in the documentation, but the CSPApplication tag seems to be exclusively for CSP file-based applications.
I'm trying to avoid implementing a workaround such as using the Invoke tag to call the Security.Applications to generate the web application but I might be forced to do so, even though it's unpleasant if I had to say...
So, is there an official way to execute this task?

22
0 791
Question amine benchaou · Feb 20, 2020

Hi All,

I need to build a search using a lot of filters, what's the best way to implement my sql requests.

1 sql request per property, or only one "big" sql request ?

what's the disadvantage of using lot of indexes ?    Thank you

KR,

Amine

5
0 363
Question Stephen Wilson · Mar 11, 2020

There does not seem to be any separation between the error code and error text in a %Status object. For custom errors, I simply want to display the message and not Error #5001: Some error text.

ClassMethodIsNonNullCustomerID(pCustomerIDAs%String) As%Status  {
Quit:(pCustomerID="")$$$ERROR($$$GeneralError,"CustomerID is not valid")
Quit$$$OK
}

The various methods described here to retrieve the error text always show

Error  #5001: CustomerID not valid
5
0 737
Question Dmitry Maslennikov · Jan 12, 2020

In one of the projects, when we have ECP with 10 ECP application servers, from time to time we faced the issue when our journals fail to purge, due to open transactions. While we have about 100-150 GB journal files per day, it quite quickly became a big issue, and with mirroring a very big issue. Mostly we just rebooted our ECP Data server, so it searches rollbacks any transactions, but such process is too long, may steal a few hours. I did not find any way, how to get the list of the open transactions from one place from ECP Data Server. We just migrated our Data server to 2018.1. while our

4
0 1078
Question Wayne Fourie · Jan 14, 2020

Hi All,

I'm having an issue where I try to use  SOAPUI for a mockup offline service, my issue is when I have the mockup service running in the background and try to send a request from cache I keep getting the following error: "ERROR #6454: No supported policy alternative in configuration".

I've tried to follow the common guidelines for resolving this issue but no luck.

So if there is maybe a nice article explaining how to send a proper request to the mockup service and then getting the response(which will be hardcoded values I've set).


Regards,

1
0 597
Article Murray Oldfield · Jun 5, 2019 2m read

If a picture is worth a thousand words, what's a video worth? Certainly more than typing a post.

Please check out my "Coding talks" on InterSystems Developers YouTube:

1. Analysing InterSystems IRIS System Performance with Yape. Part 1: Installing Yape

Running Yape in a container.

2. Yape Container SQLite iostat InterSystems

Extracting and plotting pButtons data including timeframes and iostat.

3
2 1677
Question Đặng Phú Lộc · Dec 30, 2019

Can anyone clarify to me about the differences between these two classes?

People in this topic https://community.intersystems.com/post/using-class-queries-sqlstatement-versus-libraryresultset stated that %SQL.Statement (I am assuming they mean to talk about %SQL.StatementResult) is newer than %Library.ResultSet. But I don't really know what are the advantages of %SQL.Statement over %Library.ResultSet as the people in the topic somehow didn't mention them.

Currently I have a case and it seems like the %SQL.StatementResult doesn't have enough function to cover it:

6
0 1419
Article Jose-Tomas Salvador · Apr 25, 2018 2m read

What if you could serialize/deserialize objects in whatever format: JSON, XML, CSV,...; attending different criteria: export/import some properties and not others, transform values in this or that way before exporting/importing,...; and all of this without having to change the class definition? Wouldn't that be great??

Well, perhaps it's a goal too ambitious to reach 100% but, exploring this idea, I've developed a bunch of classes that I thought it was good to share. If you want to test, change, modify or improve the code, or just take a look at it, you can do it here. There you'll find a more detailed explanation (see Readme.md)

Be aware, this is a proof of concept for myself done in spare times, sure it's not robust enough or it can be done much better... but, I was just playing...ok, I could just wait to the new JSON Adaptor (coming soon!) that sure is going to resolve much more scenarios in a cleaner way, but... meanwhile... :-) ...
4
4 2795
Question Kevin McGinn · Feb 28, 2020

I am new to Intersystems cache COS scripts (cache is a client system). ThoughCOS scripts basically appear to be straight forward, I am having issues with the logon credentials. From what I have found in the documentation, the first 2 lines of the script contain the U/P. When running the script, the username is picked up correctly but the password is not. Granted, having U/P in a script is not ideal but will suffice as a matter of learning if I can figure out the formatting/syntax required. Any help on this would be appreciated.

Kevin McGinn

3
0 375
Question Ken Wenze · Jan 6, 2020

Where can i get the latest odbc providers from SQL Server 2012/2016?

I see some posts on line to  an ftp site out there but I am unsuccessful at getting access to it.  I have a version loaded on my server but get errors when querying cache'.

"[Cache ODBC][State : 22005][Native Code 22005]" 

Any help would be appreciated.

the one we have might be version  2014.01.05851  64 bit (would that make sense?)

4
0 1819
Question Kevin McGinn · Feb 26, 2020

I have a simple python script to pull table information from cache 2018.1.2 which is on a windows 10 machine. I get no results though the same query in the management portal works correctly:

import os
import sys
import intersys.pythonbind3 as ipyb
import numpy as np

# Connect to the Cache' database
url = "localhost[1972]:%SYS"
user = "xxxx"
password = "zzzzz"

accessKey = (url, user, password)

def main(accessKey):

8
0 330
Question Colin Parker · Mar 3, 2020

Hello,

I am wondering if it is possible to access properties of a class from within a routine that has been called. See the below example:

Class TestClass Extends %RegisteredObject
{

Property Data As %ListOfDataTypes;

Method Query(parameter As %String)

{

   d runTag^ExampleRoutine(parameter)

   q

}

}

And then I have a routine:

ExampleRoutine

runTag(parameter) 

  ;I want to add some information to the Data property in the class here.

  q

3
0 321
Question Drew Holloway · Feb 28, 2020

Let's say I start with a date range of '1-5-2019' to '5-25-2019' that occurs on one row.  I'd like to ultimately have this show as 5 rows in Crystal Reports as shown below

Result

1-5-2019  1-31-2019

2-1-2019 2-28-2019

3-1-2019 3-31-2019

4-1-2019 4-30-2019

5-1-2019 5-25-2019

I found a result that worked in T-SQL, but I'm not sure how to translate it to Cache SQL.  The T-SQL code is

select dateadd(d,N.number,d.begindate) adate, data
  from data d
  join Numbers N ON number between 0 and datediff(d, begindate, enddate)

3
0 435
Question Drew Holloway · Feb 28, 2020

In T-SQL, I can create a recursive CTE to create a subquery or a view that will hold a whole lot of numbers.  Is there a way to do this in Cache SQL?  I'd like the numbers from 0 to 10000 if possible. 

Thanks!

3
0 366
Question Ali Chaib · Feb 28, 2020

Do you have any clue how to create a list of messages in studio ?

Example :

I can define one message that is called DoctorInfoMsg such as 

set DoctorInfoMsg= ##class(PKGNotification.InDoctorInfo).%New()

Where PKGNotification.InDoctorInfo is composed of 

Property UserName As %String;

Property ListOfPatients As list Of %String;

How to define a list of PKGNotification.InDoctorInfo messages ?

How to get UserName of the first message?

6
0 296
Announcement alex kosinets · Feb 8, 2020

Ladies and gentlemen, good news for our town.

It finally happened  - M was put in the cell.

And feels great there. Maybe it not a prison but an Excel cell.

Being there, he leads the whole M-gang. As well as conditional formatting in EXCEL.

Close integration of excel with the database provides a new convenient design tool.

Interactive reports, input forms, diagrams are generated only by m-commands in cells, without classical programming.

More detailed on https://github.com/mx-alex/MX

We will monitor the development of the situation and answer your questions.

best wishes

Alex

19
1 1670
Article alex kosinets · Feb 29, 2020 4m read

There is a special Query for reporting, it takes one cell of Excel. Example :

?$$omQuery 113^oPeat | Country   Country:Province   Date   Product:Date   Date:Product:-zr   | tn EURO | zrzr| | if Date'<%XD81,Date'>%XD82 |  set zrzr=zr,EURO=summa

The omQuery sets the structure and content of the required documents as well as filters and data processing procedures.

In one request, up to 9 reports are created, with subtotals by group. (5 here , 3 with:subtotals )

0
0 266
Article Robbie Luman · Feb 28, 2020 3m read

Our company is in the process of converting our software for use in Intersystems IRIS and one of the major sections of the software makes use of a custom statically-linked C library using the $ZF("function-name") functionality. During this, I found out that the process for setting up the C library to be used within the database platform has changed significantly between Cache and IRIS.

0
0 408