#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Article Mihoko Iijima · Nov 30, 2023 3m read

InterSystems FAQ rubric

Class definitions created by users are stored in class definition classes. They can be used to obtain a list of class definitions from a program.

Note: Class definition classes refer to all classes contained in the %Dictionary package.

In the sample code below, a list of class definitions is obtained using the query Summary of the class %Dictionary.ClassDefinitionQuery.

2
0 579
Article Megumi Kakechi · Nov 23, 2023 1m read

InterSystems FAQ rubric

When executing OS commands, use $ZF(-100).

do$ZF(-100,"",program,args) // Execute the Windows command [synchronously].
do$ZF(-100,"/ASYNC",program,args) // Executes a Windows command [asynchronously].

When executing OS shell commands such as mkdir and copy, also specify /SHELL.

do$zf(-100,"/shell /async","mkdir","c:\temp\x")

Please refer to the following documents for details:

About $ZF(-100) [IRIS]
About $ZF(-100)

2
1 493
Question Thiago Andrade · Nov 26, 2023

Hi folks!

I need to change a status database to RW with the class

I used scripts for this, for example, I can create a database like this

setup_database() {
csession -B -U "%SYS" <<-EOF
  zw ##class(SYS.Database).CreateDatabase("/InterSystems/cachedb/mydatabase")
  set Properties("Directory")="/InterSystems/cachedb/mydatabase"
  zw ##Class(Config.Databases).Create("MYDATABASE",.Properties)
  halt
EOF

How can I modify this status R/W?

2
0 220
Announcement Ward De Backer · Apr 13, 2023

Hey Developers,

We're honored to invite you to the first Benelux Caché User Group meetup since the start of COVID! It is dedicated to the Columnar storage, IRIS licensing, hardware & performance, and embedded Python!

⏱ Date: 04 May 2023 from 13:30 to 17:00

📍Venue: InterSystems BV, Medialaan 32 / 1, B-1800 Vilvoorde, Belgium

Do you or does your team work with InterSystems IRIS or Caché? Then this afternoon's event will be interesting to gain additional insights and meet colleagues. The team of InterSystems will be there too.

1
1 525
Question Mike Williamson · Nov 17, 2023

I'm working for an organisation that is running a very old version of InterSystems Cache (5.016) which runs on AIX . The last two times we have re-booted Cache, we have encountered rollbacks. I've been asked two questions. During the rollback it was "How long is it going to take?" and after the system returned, it was "So what caused it?". My answer to both was "I don't know".

4
0 462
Question Ravi Kushwaha · Nov 21, 2023

Hi,

After upgrading from Cache to IRIS while running the web application I am getting an error in message.log

 Error: Create Gateway - Unable to create new gateway connection: ERROR #5023: Remote Gateway Error: <NOTOPEN>%AddToCurrentClassPath+6^%Net.Remote.Gateway.1

Cache Version : Cache for Windows (x86-64) 2018.1.7 (Build 721U) Fri Mar 18 2022 22:07:35 EDT

Upgrade to IRIS Version : IRIS for Windows (x86-64) 2022.1.2 (Build 574_0_22511U) Thu May 11 2023 22:36:05 EDT 

1
0 299
Question Alan Watts · Nov 20, 2023

I tried both the latest 32-bit and 64-bit Cache ODBC drivers, but I’m getting this “Message sequencing error” when I attempt to connect to the Cache server.  Client is a Windows Server 2022. Server is a 2008 version of Cache ( or customer thinks). I’ve tried a number of things without success.  If I enter invalid credentials I do get the quick “Access Denied” response.  But when I have the proper IP/port/namespace/credentials I consistently get this error below.  Google shows others struggle with that error, but no resolution.  I’m suspicious that the version of ODBC needs to be in synch with

0
0 376
Question Yone Moreno · Nov 6, 2023

Good morning,

First of all we would like to thank you for your time reading, thinking and aswering this question.

We have been developing a Transformation to convert a source ORU_R01 to a target ORU_R01. For each OBX segment we need to check an if, and then, if it is true we just need to put this OBX and continue to the next iteration, otherwise, if it is false, we need to put (copy) the ORC + OBR + TQ1 before this OBX, and then put this OBX, and after that, the SPM.

4
0 309
Question Wesley West · Nov 15, 2023

I am trying to execute a program from within cache using a $zf call

S X=$ZF(-1,"C:\""Program Files (x86)""\Car-Part\Messaging\iCPM.exe")

For the sake of this post I changed it to open notepad

S X=$ZF(-1,"C:\Windows\notepad.exe")

If I call it directly from terminal notepad opens and all is happy.  

If I add it to a program we use to run certain tasks once an hour or even every 10 minutes it will fire off notepad but it will be in the background.

The messaging application we use will not work at all in the background and needs to be in the foreground.  

2
1 311
Article Mihoko Iijima · Nov 9, 2023 1m read

InterSystems FAQ rubric

To create a user-defined error you need to prepare the XML that describes the error code and corresponding message that you want to use as a user-defined error.

Please set the error code as a negative integer.

<?xml version="1.0" encoding="UTF-8"?> 
<MsgFileLanguage="en"><MsgDomainDomain="UserErrors"><MessageId="-111"Name="MyError">An error has occured</Message> 
    <MessageId="-222"Name="MyError2">An error has occured 2</Message> 
  </MsgDomain></MsgFile>

Once the XML file is created, load it into the namespace you want to use.

2
2 685
Question Shashvati Dash · Nov 6, 2023

There is test folder inside my sftp server. I executed the below lines of code

s ssh = ##class(%Net.SSH.Session).%New()

d ssh.Connect("host")

d ssh.AuthenticateWithUsername(username,password)

d ssh.OpenSFTP(.sftp)

s remote="\test\sample1.txt"

s local="c:\orders\sample1.txt"

s status=sftp.Put(local,remote)

I get the below error 

"MSSH Error [8010102B]: Unable to send FXP_OPEN* [8010102b] at SFTP.cpp:539,0Put,IM%e^zPut+2^%Net.SSH.SFTP.1^1e^^^0"

4
0 436
Article Steve Wilson · Nov 3, 2016 2m read

I was recently asked whether we have a function to convert LDAP date time stamps into $HOROLOG format or other formats and the answer is not at the moment, but there is a simple method to do the conversion.

Let us look at the facts and figures involved...

1) Active Directory's (AD) date 0 (zero) is 1601-01-01 00:00:00.000 or January 1st, 1601 at midnight (00:00:00)

2) AD timestamps are calculated as the number of 100 nanosecond intervals from date 0

3) 864000000000 is the number of 100 nanosecond intervals per day

1
0 1175
Article Mihoko Iijima · Nov 2, 2023 3m read

InterSystems FAQ rubric

For routines (*.mac)

You can hide the source by exporting/importing only the *.obj that is generated after compiling the source program.

The command execution example specifies EX1Sample.obj and EX2Sample.obj, which are generated by compiling EX1Sample.mac and EX2Sample.mac, as export targets and exports them to the second argument file.

After moving to another namespace, I am using the exported XML file to perform the import.

1
0 633
Question Avi Luzon · Nov 1, 2023

hi

we have a rest API that that on of the JSON object contain Property name "verify.facePosition"

we try to translate the JSON file to object with the function ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject()

how can we define the Property to "verify.facePosition" As %Boolean in the class ? 

i know that with underscore i can define the property with quotation marks like this - Property "verify_facePosition" As %Boolean

thanks for the help 

4
0 361
Question João Carlos Azevedo · Oct 23, 2023

I need to develop a tool to help to get what data is being consumed by a certain process, in order to get all data used to build an automated test scenario.

For example, some user process will pull data from ^GLOBAL(1)="dataString", ^GLOBAL(2)="dataString2", ^GLOBAL1(1)="data1String", ^GLOBAL2(4)="data2String4". Amidst all other data on these Globals, I will ignore everything that was not used in the user process, and get the specific keys used on it.

12
0 479
Question Token Ibragimov · Oct 31, 2023

Hello,

I'm making rest API service with Authentication.

How I can return HTTP Status 403 if user enter invalid login or password?

Now returning Http status 200.

Class RestAPI Extends %CSP.REST
{

XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap]
{
<Routes>

<Map Prefix="/restforms" Forward="Form.REST.Main"/>
<Route Url="/auth/:login/:pass" Method="GET" Call="CheckUser" Cors="true"/>
</Routes>
}

ClassMethod CheckUser(userAw, pwdAw) As %String
{

set %response.ContentType = "application/json"

// my code to check auth

3
0 315
Question Ruiyan Yu · Oct 26, 2023

Hi,

An exception occurs randomly. I expect the value of ^TEST to be 20, but it's not. Did i miss something like closing, flush the stream or locking the global?

Exception

<ILLEGAL VALUE>%SaveData+15^%Stream.GlobalCharacter.1×PRAX1Í+^%SaveData+15^%Stream.GlobalCharacter.1^1)e^%SerializeObject+6^%Stream.Object.1^2e^%Save+9^%Stream.Object.1^93e^zCopyFromAndSave+58^%Stream.GlobalCharacter.1^1e^test+11^ry^1e^test+3^ry^4d^^^0

Testcode

13
0 505
Question Robert Steed · Oct 23, 2023

This applies to embedded and dynamic SQL queries in Caché ObjectScript. If I attempt to terminate the process via Management Portal, nothing happens. Neither does Ctrl C nor closing the terminal window in which my program is running, nor setting a stop flag in a global which is read by the program on each loop iteration. The only way to stop the query appears to be restarting the Caché server (which is running locally on my PC).

6
0 714
Question Lucas Galdino · Oct 26, 2023

I'm dealing with a situation that leaves in doubt what I understand about CACHE.WIJ (C:\Roche\CobasInfinity\HealthShare\mgr).. Journal files store records already written to the base.. and CACHE.WIJ records not yet written to the base..theoretically, the data contained in CACHE.WIJ is temporary... until the record is written to the base (consequently generating journal).The question arose because I have a .WIJ file from 03/10/2023 (modification date) with approx. 4GB.. theoretically the WIJ does not should it be written/modified every day? because the system is in full use, with continuous

4
0 384