#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Luiz Henrique Carvalho Martarelli · Dec 5, 2022

Hi!

I'm trying to install a ZPM package in my 2018 cache to use swagger-ui in my api-rest, but when I execute command line:
Do $System.OBJ.Load("/mypath/zpm.xml","ck")

I receive this error message:

ERRO #6301: Erro no Parser XML SAX: Linha: 2 Deslocamento: 39 Este arquivo não parece ter sido exportado pelo Caché, não é possível importá-lo.
ELEMENTO DE ORIGEM: %ZEN.Component.html (htmlContent)

I'm trying to install the version: zpm-0.5.1

Can anyone help me?

3
0 283
Question Oleksandr Demchenko · Nov 18, 2022

Hi, how do I create a trigger that will only set the value of the "Status" field for new objects, not for all available?

Class CarDealer.Order Extends (%Persistent, %Populate)
{

 Property Title As %String

 Property Status As %String(VALUELIST = ",InProgress,Done,Canceled");

Trigger setStatus [ Event = INSERT, Foreach = row/object, Time = AFTER ]
{
 &sql(update CarDealer.Order set Status = 'InProgress')
}

2
0 575
Question Yone Moreno · Dec 1, 2022

Hello, first of all thanks for your time and help.

We do send from a REST POST request using SoapUI software, an "Authorization Bearer".

POST http://[IP]:[Port]/aplicaciones/scs/informescctest/Servicios.SOAP.InformesCConcertadosv01r00.cls HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Authorization: Bearer eyJ0e[...]
SOAPAction: http://SCS.Servicios/InformesCConcertadosv01r00/ResultadosER7
Content-Length: 1871
Host: AAA
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Our mission is to get it inside a SOAP

1
0 393
Question Andy Stobirski · Nov 30, 2022

Hi

I have two tables: one a local table using cache and the other is via an SQL gateway connection to an MSSQL Server via a 64bit ODBC driver (ODBC Driver 17 for SQL Server).

When I try to join them on a date field I don't get any matches, and I know that there are matches, e.g. running both views separately returns resuls for 30/11/2022.

The following statement returns rows for the first table r, but nothing for the table l

select  r.*, l.*
from    GMMHTIE_PCMIS_Table_PCMIS.vwPCMISNewCasesCount r
        leftouterjoin GMMHTIE_PCMIS_Table_Local.vwPCMISNewCasesCount l
            on l.
5
0 486
Article Pran Mukherjee · Oct 24, 2022 10m read

Purpose

This set of tools (RanRead, RanWrite, and the combined RanIO) is used to generate random read and write events within a database (or pair of databases) to test the IO speed of IRIS running on a specified hardware setup. While Read operations can be measured in the usual Input/Output operations per second (IOPS) since they're direct disk reads, write events are sent to the database and thus their physical writes are managed by IRIS's write daemon.

Results gathered from the IO tests will vary from configuration to configuration based on the IO sub-system. Before running these tests, ensure corresponding operating system and storage level monitoring are configured to capture IO performance metrics for later analysis. The suggested method is by running the System Performance tool that comes bundled within IRIS. Please note that this is an update to a previous release, which can be found here.

1
1 986
Question Tiago Pereira · Nov 18, 2022

Hi everybody!

I'm new to a Caché world and need some help! Where I work we are running Cache 2016.1 version in a server, and 2018.1 in another server. I want to upgrade the version 2016.1 to 2018.1, but I fear it can raise some errors tha I cant resolve yet. My doubt is,  if I upgrade it will run ok?

Thanks in advance!

3
1 540
Question xu zong · Nov 22, 2022

Hi,

We have 2 writer threads, each has a connection to Cache. When write records to Cache, we use PreparedStatement.executeBatch() with the batchSize 10 000.

We got very very slow insert speed.

But if only 1 writer thread used, the speed is faster, just as normal.

Any idea?

9
0 637
Question Flávio Lúcio Naves Júnior · May 6, 2021

Hello everyone,

I have a doubt, its possible to use interface like C# using COS? 
Remember, interface is different from Abstract Class, because a abstract class can implement code in the method, so I don't want this, I want only define the methods from Class, not allowing implement code.

Description of C# interface: An interface defines a contract. Any class or struct that implements that contract must provide an implementation of the members defined in the interface. Beginning with C# 8.0, an interface may define a default implementation for members.

5
0 832
Question Smythe Smythee · Nov 16, 2022

Hi,

I

want to get the values from a serial property because my code depends upon the class serial class.

For example

Serial class

Class Data.Serial Extends %SerialObject

{

Property FirstName as %String;

Property LastName as %String;

}

Persistent class

Class Data.Persistent Extends %Persistent

{

Property MPID as %Integer;

Property Name as Name.Serial;

}

Now i need save MPID and Name(Serial class property into SQL Table ) so i am trying the below class

Class Data.TestUtil Extends %RegisteredObject

{

Method Savedata(MPID,FirstName,LastName)

{

Set tSC=0

Set Obj=##Class(Data.Persistent).%New()

Set Obj.MPID=MPID

Set Obj.

2
0 635
Question Fabio Care · Nov 14, 2022

Hello, 

I'm currently struggeling with a HTTP request to a URL, which contains an jpeg image file. 

Testing the request with a browser or Postman results in the image being shown normally. 

Using a %Net.HttpRequest with different configurations has resulted in a corrupted file. 

My code works for some URLs from other servers perfectly fine, but with some it produces corrupted file contents which do not represent a jpeg. 

 REQ,STATUS,RET
 Set REQ=##class(%Net.HttpRequest).%New()
 Set REQ.Server="www.distrelec.de"
 set REQ.SSLConfiguration="agimero.quwiki.de"
 SET REQ.FollowRedirect=1
 SET REQ.

5
0 652
InterSystems Official Raj Singh · Nov 8, 2022

I'm pleased to announce a milestone in the lifecycle of the ObjectScript package manager, ZPM. The package manager has offered developers the ability to neatly package up ObjectScript code and deployment configuration settings and version information in a convenient way. Over the last few years, it has evolved greatly into an integral part of many development workflows.

10
3 2171
Question Thembelani Mlalazi · Sep 24, 2018

I am trying to work with Java Selenium through Cache  my java programme works fine but I would like to pass parameters to the jar file form my Ensemble production. I followed this Tutorial here, For starters I wanted to copy it as it is and run that as an example but the (Stateless Service Mode Example) is not working within my eclipse environment with errors on the com.intersys. complaining about the service class.

2
0 624
Question Yan Kevin · Jul 13, 2022

Hi,

when I using ObjectScript Trigger Code , I want to get whether the fields has changed by using "{fieldName*C}" ,  actually, fieldName in "{fieldName*C}" is a real field name ,but in my code, fieldName is a variable as follows:

SET stat=##class(%SYSTEM.SQL).GetColumns(tableName,.byname,.bynum,1)
		IF stat=1{
			SET i=1WHILE$d(bynum(i)){
				SET xColName=bynum(i)
				SET valComp={xColName*C}
				
				IF valComp=1{
					SET oldVal=1//{xColName*O}SET newVal=2//{xColName*N}
					&sql(INSERTINTO Yan.
5
1 676
Question Ward De Backer · Oct 28, 2022

Hi developers!

As a follow-up to my previous post on the Node.js Native API, I created a quick poll because it may be interesting to see what technologies developers are using in their applications around the world with IRIS & Caché. I put a poll below, just check all boxes you have used or plan to use with InterSystems technology.

Thank you all for your cooperation!

1
0 470
Article Lexi Hayden · Aug 24, 2017 1m read

Recently there was an internal email thread on which SMTP server to use in demos. I thought I'd share the comments from that thread:

  • Person 1: I tried gmail  (smtp.gmail.com, port 465) this morning, it works fine.
    To use gmail, you must enable 2-step verification for your google account and generate App password. https://support.google.com/mail/answer/185833?hl=en
  • Person 2:  I use https://www.hmailserver.com 

  • Person 3: I, too, use hMailServer as a local SMTP server on my demo VMs, with a mail client (usually Outlook) also on the VM. So no need to connect out to an SMTP server on the Internet.

3
0 1041
Question Smythe Smythee · Nov 7, 2022

Hi Community,

I am working on sending Gmail with error details when any errors occurs in the ensemble production.

I am facing the below issues while doing it

1.I have Ens.Alert (Business process) using the class Ens.Alerting.AlertManager and Emailoperation (Business operation) using the class EnsLib.EMail.AlertOperation. here my business process is not sending the Alarm request to business operation eventhough i am using rule to connect the business operation 

2.What are SMTP server details needs to given for Gmail?

Please let me know how to resolve these issues

Thanks,
Smythee

2
0 409
Question Ruiyan Yu · Nov 5, 2022

Hi,

I would like to use the XML Schema Wizard / %XML.Utils.SchemaReader to generate the Cache classes.

It seems Xerces has trouble with xs:import. XSD Source - DMP_Rheumatoide_Arthritis.xsd

Fehler: FEHLER #5373: Klasse 'DMP.cda.dmpclinicaldocumentheadertyp', von 'DMP.cda.levelone:property:clinicaldocumentheader' benutzt, existiert nicht
Abgeschlossen bei 2022-11-05 22:17:18

Maybe I can solve this problem by enabling this feature in Xerces somehow?

http://apache.org/xml/features/honour-all-schemaLocations

Is there any other way to work around this problem?

Best regards

Ruiyan Yu

0
0 340
Article Mark Bolinsky · Jan 29, 2016 4m read

** Revised Feb-12, 2018

While this article is about InterSystems IRIS, it also applies to Caché, Ensemble, and HealthShare distributions.

Introduction

Memory is managed in pages.  The default page size is 4KB on Linux systems.  Red Hat Enterprise Linux 6, SUSE Linux Enterprise Server 11, and Oracle Linux 6 introduced a method to provide an increased page size in 2MB or 1GB sizes depending on system configuration know as HugePages.

At first HugePages required to be assigned at boot time, and if not managed or calculated appropriately could result in wasted resources.  As a result various Linux distributions introduced Transparent HugePages with the 2.6.38 kernel as enabled by default.  This was meant as a means to automate creating, managing, and using HugePages.  Prior kernel versions may have this feature as well however may not be marked as [always] and potentially set to [madvise].  

Transparent Huge Pages (THP) is a Linux memory management system that reduces the overhead of Translation Lookaside Buffer (TLB) lookups on machines with large amounts of memory by using larger memory pages.  However in current Linux releases THP can only map individual process heap and stack space.

9
5 5772
Question Andy Stobirski · Nov 1, 2022

Hi 

I have a  Zen Page with tablepane which has a datasource in a different namespace to that of the Zen Page. When the page is run, no data is returned and the tablepane is not populate,  even though the rerferenced table contains dat.

The tablePane code is as follows:

<tablePaneid="DataExtractionCurrent"showZebra="true"cellSpacing="2px"OnCreateResultSet="DataExtractionCurrent"></tablePane>

The OnCreateResultSet points to the following method:

Method DataExtractionCurrent(Output tSC As%Status, pInfo As%ZEN.Auxiliary.
4
0 375
Article Eduard Lebedyuk · Nov 26, 2018 2m read

In this article, I would show how you can upload and download files from InterSystems products via http.

The questions about working with files over http arise fairly often on community and I'm usually linking to my FileServer project which demonstrates file upload/download but I'd like to talk a bit more on how we can serve and receive files from InterSystems products.

3
5 3098
Question Giray Ozel · Mar 2, 2018

I was able to run the Cache terminal from the command prompt with the following command, in the namespace that I provided in the brackets:

cterm /console=cn_ap:ENSEMBLE[TEST_1]
But the command suddenly stopped opening the terminal in the correct namespace. It just opens it in the default namespace. I tried it with different namespaces or invalid namespaces, it always opens the terminal in the default namespace now.

I cannot figure out what is causing this behaviour.

5
0 1300
Question David Hockenbroch · Nov 2, 2022

Is there a way to add specific table permissions to a security role programmatically? I'm working on scripting some of the initial setup work when we sell certain add-ons to our software, and I see how I can assign resources to a role and give it a description, but I don't see how I tell it that this role gives the user, for example, SELECT privileges only on the invoices table, or SELECT, INSERT, UPDATE, and DELETE.

1
1 333
Article Timothy Leavitt · May 12, 2016 6m read

The topic of for/while loop performance in Caché ObjectScript came up in discussion recently, and I'd like to share some thoughts/best practices with the rest of the community. While this is a basic topic in itself, it's easy to overlook the performance implications of otherwise-reasonable approaches. In short, loops iterating over $ListBuild lists with $ListNext or over a local array with $Order are the fastest options.

As a motivating example, we will consider looping over the pieces of a comma-delimited string.

21
5 10128