#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Stefan Cronje · Apr 5, 2024

Hi all,

I have a situation where I am writing to global from different processes - let's call it an Event Queue.
There is then a different process that uses $order to read through the data - the PubSub processing BP.

Sometimes the writing of this global will form part of a transaction that also insert data into other tables, using tstart and tcommit.
If there is some issue, it will roll back, and the entry written to the global will also roll back.

6
0 242
Question Amiram Kasos · Feb 8, 2024

Hi,

I am trying to connect to another server using  %Net.HttpRequest.

I keep getting this error  : SSL23_GET_SERVER_HELLO:unsupported protocol.

My guess is that the site I am reaching for uses TLS1.3 which is not supported in 2016, But I cant right now ask my client to upgrade.

Is it possible to override this ? install some kind of a patch or a more recent version of openssl on the server ?

Thanks

Amiram

2
0 231
Article Hiroshi Sato · Apr 4, 2024 1m read

InterSystems FAQ rubric

The Web/CSP Gateway management page is typically configured so that it cannot be accessed from client machines.

To access from any client, do the following:

  1. Launch a browser from a system with access to the Web/CSP Gateway management page and access the Management Portal.
  2. Under Management Portal > System Administration > Configuration > click CSP Gateway Management.
  3. Click Default Parameters that appear in the left pane of the page that appears.
  4. Enter *.*.*.* in the system management machine and press the Save Settings button.
0
0 322
Article Daniel Aguilar · Mar 22, 2024 3m read

 

Hi Community!

 

Do you usually work with automated tasks? Then let me share with you a pair of tips ;-)

 

Tip 1: How to know when my automated task will end (approximately)

 

Do you have an automated task that is running but you are not sure when it will end and you are at the crossroad of take the decision to stop it or wait and you are not sure if could be better wait for 5 o 10 minutes?

Here you are a tip to check when your task will finish (approximately).

4
2 357
Announcement Rob Tweed · Sep 28, 2022

I'd like to announce the release of something really rather interesting - revolutionary in fact.  That may sound like hyperbole, but I don't think you'll have seen anything quite like this, or even thought it possible!

We've pushed out a new JavaScript/Node.js module named glsdb which you can read all about here in detail:

https://github.com/robtweed/glsdb

However, for the purposes of this announcement here, I just want to focus on one part of glsdb: its APIs that abstract IRIS (or Cache) Classes as equivalent JavaScript Objects.

8
1 481
Question JASON PARKER · Mar 23, 2024

Hello everyone,

I have a Cache class with just 2 fields

Class JASON.BikeDB Extends (%Persistent, %Populate)
Property Make As %String [ Required ]; /// Model of the Motorcycle
Property Model As %String [ Required ];

I also have another class with several ClassMethods, just showing you 1 here

Class JASON.DataBase Extends %Persistent
{ ClassMethod SaveNew(Make As %String, Model As %String)
{
Set obj=##class(JASON.BikeDB).%New()
Set obj.Make=Make
Set obj.Model=Model
Set sve=obj.

6
0 372
Question Richard Rayburn · Mar 22, 2024

In cache studio there are features, dialog boxes, that help map data from a global to class properties.
I have used %CacheSQLStorage quit a bit, or have in the past, to map globals to classes.

I haven't been able to find a similar feature in VisualStudio.
Do I need to upgrade to IRIS to be able to use VisualStudio to map global properties to classes?

Thanks for your time,
Richard

2
0 228
Article Hiroshi Sato · Mar 21, 2024 2m read

InterSystems FAQ rubric

Properties defined in list collections (Property XXX As list of %String;) can be manipulated using SQL functions: $LISTBUILD(), $LISTFROMSTRING().

For each SQL function, please refer to the document page below.

InterSystems SQL Reference - $LISTBUILD() [IRIS]
IRIS SQL Reference - $LISTFROMSTRING() [IRIS]
Caché SQL Reference - $LISTBUILD()
Caché SQL Reference - $LISTFROMSTRING()

/// Class definition example
Class ISJ.ListOfData Extends %Persistent
{
    Property listdata As list Of %String;
}

An example of SQL statement execution is as follows. 

USER>do $systemSQL.
1
1 326
Question amine benchaou · Mar 21, 2024

Hi Allen,

A partner have decided to change the algorithms that were used to connect on it's SFTP, but our version of libssh2 don't match with the list of it's HOSTKEYS algorithms.  

If i update the library with the last version without to be sure that it includes the old algorithms, i risk to break the connection for other cases.

all suggestions are welcome. Thx

KR,

Amine

1
0 1254
Question Token Ibragimov · Mar 7, 2024

Hello!

How I can send Synchronous request ?

For example when I cannot call another process until my first business process do not finish.

ClassMethod Main() {

 set sc = FirstProcess()

//Dont start until first process finish
set sc = SecondProcess() 

}

ClassMethod FirstProcess() {

Set sc = ##class(Ens.Director).CreateBusinessService("BusinessServiceName", .BService)

Set sc = BService.ProcessInput(BSRequest,.BSResponse)

}

ClassMethod SecondProcess() {

Set sc = ##class(Ens.Director).CreateBusinessService("BusinessServiceName", .BService)

Set sc = BService.
4
0 275
Article Hiroshi Sato · Mar 7, 2024 1m read

InterSystems FAQ rubric

You can use the %IndexBuilder class to perform index rebuilding using multiple processes.

Here is an example for the purpose of defining the standard index HomeStateIdx for the Home_State (state information of contact address) column of Sample.Person.

The steps are as follows:

1. Hide the index name to be added/rebuilt from the query optimizer.

>write $system.SQL.SetMapSelectability("Sample.Person","HomeStateIdx",0)
1

2. Add %IndexBuilder to the rightmost superclass of the class definition that defines the new index.

0
1 319
Question Anna Golitsyna · Mar 5, 2024

The task for a file on disk is to open it, find a keyword (unique) and then read the file line by line, starting with the line with this keyword, then find the next keyword (also unique) and read from that location etc. I would think ObjectScript classes should be able to do that, but the solution eludes me. I probably need to use FindAt to get a position, but ReadLine does not seem to have a position argument. Any advice?

6
0 437
Article Lily Taub · Mar 19, 2019 9m read

Intro

Most server-client communication on the web is based on a request and response structure. The client sends a request to the server and the server responds to this request. The WebSocket protocol provides a two-way channel of communication between a server and client, allowing servers to send messages to clients without first receiving a request. For more information on the WebSocket protocol and its implementation in InterSystems IRIS, see the links below.

7
3 6170
Article Hiroshi Sato · Feb 29, 2024 1m read

InterSystems FAQ rubric

Global mappings can be registered using the system class Config.MapGlobals.

The method to globally map ^Sample.PersonD in a database SAMPLES other than the default database from the namespace USER is as follows (example executed in a terminal).

USER>zn "%SYS" 

%SYS>set ns="USER" 

%SYS>set glo="Sample.PersonD"
 
%SYS>set vals("Database")="SAMPLES"
 
%SYS>set st=##class (Config.MapGlobals).Create(ns,glo,.vals)

The third argument of the Create() method of the Config.MapGlobals class is passed by reference, so specify it by appending a period (.) to the variable name.

0
1 358
Question Anna Golitsyna · Feb 27, 2024

The goal is to identify programmatically all SOURCE namespaces on a server to which the routines are mapped. In the example below from the Namespaces page in Management Portal the answer would be USER. But some other namespaces on the same server could be mapped to a different namespace or even mapped to itself.

This code snippet prints all namespaces and source namespaces for their routines.
zn "%SYS"
set statement=##class(%SQL.Statement).%New()
set status=statement.%PrepareClassQuery("Config.Namespaces","List")
set resultset=statement.%Execute()
while resultset.

6
0 355
Question Lowell Buschert · Feb 25, 2024

I am sending an httpRequest from ObjectScript to a python server.   I am not receiving a response in OS
 
OS config On the client side

// Create an HTTP request object
    Set httpRequest = ##class(%Net.HttpRequest).%New()
    
    // Set the server URL
    Set httpRequest.Server = "http://127.0.0.1:8080"
    
    // Set content type to JSON
    Set httpRequest.ContentType = "application/json"

    // Clear any existing entity body"{""name"": ""Lowell Buschert"", ""dob"": ""1970-12-09"", ""address"": ""XXXXX""}"
    do httpRequest.EntityBody.Clear()
    //Set httpRequest.

5
1 282
Question Token Ibragimov · Feb 28, 2024

Hello!

How I can call my Business process - "process.ReconciliationPayments" from method. Like this.

ClassMethod getReportPavlodarEnergoSbyt()
{

s sc = $$$OK

ensBS = ##class(Ens.BusinessService).%New()

requestObj.operationDate="2024-02-28"
requestObj.provider="Provider"
requestObj.processId=$SYSTEM.Util.CreateGUID()

ensBS.SendRequestAsync("process.ReconciliationPayments",requestObj"payment")

q sc

}

7
0 363
Question Shashvati Dash · Nov 30, 2023

s ftp=##class(%Net.FtpSession).%New()
 s ok=ftp.Connect(server,user,password,port)
 s ftp.Timeout = 100
 
 i ok {
   
   s ok=ftp.SetDirectory(directory) 
   i ok {
     n files,file
     
     s ok=ftp.NameList(directory,.files)
     i ok {
       f i=1:1:files.Count() {
         s file=files.GetAt(i)
         i (ftp.SetDirectory(file)) {
           d ftp.SetToParentDirectory()
           continue
         }
         s fname=$p(file,"/",$l(file,"/"))
         s ok=ftp.Retrieve(file,.data)

1
1 313
Question david clifte · Dec 2, 2016

How to remove accentuation of a word?

Ex:

Árvore = Arvore

você = voce

Então = entao

The words above are in brazilian portuguese, I need to get rid with the accentuation such that I can compare two sentences.

Thanks in advance.

5
0 1007
Article Mihoko Iijima · Feb 22, 2024 2m read

InterSystems FAQ rubric

To remove InterSystems products installed on your Windows system, use Add or Remove Programs in Control Panel (in Windows 10, select Apps from Windows Settings).

Since we will be making changes to the system, you will need to log in as a user with administrator privileges.

1) Log in to the system as an administrator.

2) From the system tray, exit the launcher of the InterSystems product instance you want to uninstall (click launcher → exit).

0
0 515
Question Scott Roth · Feb 22, 2024

Our 3M Computer Assisted Coding system goes down on a regular basis for updates, the Applications folks like us to Disable the Business Operations when this happens and start them back up when they page the on-call person. The Business Operations have to be started in a sequence to guarantee that all the ADT being sent it processed before we start sending everything else.

0
0 215
Question omer · Feb 13, 2024

I want to create a datatype that Extends from String and in its set and get it will parse the string or do whatever - my GET works, my SET doesn't.

A deeper explanation of what i am trying to do: Basically none of the usual LogicalToStorage and other functions listed in Datatype creation in the manual is helpful to me, So i wanted to write the Get and Set functions in the Datatype so when compiled each property in other class that is of that type would get its PropertySet() and PropertyGet() overridden, That way i can implement any behaviour of that datatype as i please - "behind the scenes".

7
0 383
Question Colin Brough · Feb 13, 2024

Does the GetValueAt method of an EnsLib.HL7.message object change the contents of the HL7 message?

We want to do two things, given an incoming HL7 message, in our production:

  • transform the HL7 to XML, where the class TNHS.Utils.HL7toXML provides the same methods as, for example, EnsLib.HL7.Util.FormatSimpleXMLv2:
    set sc = message.OutputToLibraryStream(xmlstream,"","","TNHS.Utils.HL7toXML")


     

  • extract a value from a particular field in the message: 
    Set ReportId = message.GetValueAt("PIDgrpgrp(1).ORCgrp(1).ORC:3.
3
0 534
Article Hiroshi Sato · Feb 15, 2024 2m read

InterSystems FAQ rubric

The $ZF(-100) command is used in the following format.

$ZF(-100, flags, command name, command arguments)

The "/shell" flag is required when running OS commands.
For example, use mkdir like this:

 // mkdir C:\temp\newdir
 Write $ZF(-100, "/shell", "mkdir", "C:\temp\newdir")


If a command has multiple arguments, enclose them in double quotes and separate them with commas, as in the example below.

 // move C:\temp\a.txt C:\temp\a2.txt
 Write $ZF(-100, "/shell", "move", "C:\temp\a.txt", "C:\ temp\a2.
0
3 379