Let's suppose two different routines use one and the same chunk of code. From the object-oriented POV, a good decision is to have this chunk of code in a separate class and have both routines call it. However, whenever you call code outside of the routine as opposed to calling code in the same routine, some execution speed is lost. For reports churning through millions of transactions this lost speed might be noticeable. Any advice how to optimize specifically speed?

0 14
0 89

If you're migrating from Oracle to InterSystems IRIS—like many of my customers—you may run into Oracle-specific SQL patterns that need translation.

Take this example:

SELECT (TO_DATE('2023-05-12','YYYY-MM-DD') - LEVEL + 1) AS gap_date
FROM dual
CONNECT BY LEVEL <= (TO_DATE('2023-05-12','YYYY-MM-DD') - TO_DATE('2023-05-02','YYYY-MM-DD') + 1);

In Oracle:

1 0
0 24
  1. I like the Application Error Log functionality a lot. However, it becomes time consuming to inspect it date by date and directory by directory on a multidirectory server. Ideally, I would use an existing error class to write a custom error report by date, selected namespaces, etc. Does such a system class actually exist? Not that I found. The detail level on the screenshot below is enough.
0 9
0 64

Hey everyone,

I'm diving deeper into Caché ObjectScript and would love to open a discussion around the most useful tips, tricks, and best practices you’ve learned or discovered while working with it.

Whether you're an experienced developer or just getting started, ObjectScript has its own set of quirks and powerful features—some well-documented, others hidden gems. I’m looking to compile a helpful set of ideas from the community.

Some areas I’m especially interested in:

4 1
3 61
Question
· May 18
REST API Issue

I have a rest API Class used for getting data from Cache 2018 version.
I have single route '/callfuntions'
I send the following parameters to the API :- className, methodName, params
I use $CLASSMETHOD to execute and send the result back to the client.

If I make more that 10 to 12 requests in quick succession, then it stops sending data.

0 3
0 56

We have a machine that serves 4 instances of Cache on VMS systems, one of them is password protected and works fine as they all do. we decided we wanted something beefier and copied it to a server, well all but the one you have to login to works so 3 of the 4 do. and the odd part is I can no longer get to the management page from anywhere on any machine, http://localhost/csp/bin/Systems/Module.cxw I get a 404.8 error, I have tried adjusting security and same thing. and a server availability error.

0 5
0 331

It helps to remove special characters, such as non-utf-8 characters either control characters or unicode characters from text that is not printable or can't be parsed by downstream systems.

There is also $C(32) in this condition; sometimes NBSP appears in the text and it will not be recognized by TIE, but downstream it displays as "?".

2 4
1 111
Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

2 31
3 3.4K

Hello, we are currently using the Cache Database released in January 2018.

There are no specific classes or SQL mappings in the namespaces where data is stored.

Only a few routines(.mac) and stored data are in the global area.

In this case, when accessing the Cache DB through Java, is it essential to write SQL mappings or wrapper classes? The reason I ask is that our team doesn't have advanced developers who specialize in Cache.

Alternatively, is it possible to directly call pre-existing routines from Java?

0 2
0 43
InterSystems Official
· Mar 27 4m read
2025.1 Modernizing Interoperability User Experience

The Interoperability user interface now includes modernized user experiences for the DTL Editor and Production Configuration applications that are available for opt-in in all interoperability products. You can switch between the modernized and standard views. All other Interoperability screens remain in the Standard user interface. Please note that changes are limited to these two applications and we identify below the functionality that is currently available.

21 16
3 409
Article
· Jun 12, 2017 1m read
Setting the Windows service account

I recently helped a site investigate a problem that appeared after they upgraded their Windows instance of Caché from 2015.1 to 2017.1. A terminal session launched from the server's desktop cube was unable to run OS-level commands using the $ZF(-1) function. For instance, using the no-op command "REM" as follows:

write $zf(-1,"rem")

was returning -1, indicating that the Windows command could not be issued.

8 7
1 1.7K

When using standard SQL or the object layer in InterSystems IRIS, metadata consistency is usually maintained through built-in validation and type enforcement. However, legacy systems that bypass these layers—directly accessing globals—can introduce subtle and serious inconsistencies.

1 0
0 41

i have a line in my *.scr file like this:

send: s rlt=##class(%SYS.Namespace).ListAll(.rlt)<CR>
wait for:USER>
send: S A="" F S A=$O(rlt(A)) q:A="" I A["USER"!(A["CLIE") F I=1:1:$L(L,",") S G="^["""_A_"""]"_$P(L,",",I) S B="" F S B=$O(@G@(B)) Q:B="" F J=1:1:$L(B) S V=$A($E(B,J,J)) I (V<48!(V>57))&&(V<65!(V>90))&&(V<97!(V>122)) W A,?10,G,?30,B,!<CR>
wait for:USER>

it errors out with this <SYNTAX> error where the "<" or ">" are not accepted.

0 3
0 60
Article
· Jul 8, 2020 7m read
Tips for debugging with %Status

Introduction

If you're solving complex problems in ObjectScript, you probably have a lot of code that works with %Status values. If you have interacted with persistent classes from an object perspective (%Save, %OpenId, etc.), you have almost certainly seen them. A %Status provides a wrapper around a localizable error message in InterSystems' platforms. An OK status ($$$OK) is just equal to 1, whereas a bad status ($$$ERROR(errorcode,arguments...)) is represented as a 0 followed by a space followed by a $ListBuild list with structured information about the error. $System.Status (see class reference) provides several handy APIs for working with %Status values; the class reference is helpful and I won't bother duplicating it here. There have been a few other useful articles/questions on the topic as well (see links at the end). My focus in this article will be on a few debugging tricks techniques rather than coding best practices (again, if you're looking for those, see links at the end).

15 8
11 2.3K