Article
· May 22, 2022 1m read
Debugging Trick with SQL

I'm sure you have met this situation:

  • There is a bug in a System that you can't reproduce yourself locally
  • You need to run a few lines in the affected instance
  • You get full access to System Management Portal
  • But there is just no terminal, nor console, nor access with Studio, Atelier or VSCode
  • How to run your few lines for testing ???

19 3
5 871
Article
· Nov 26, 2021 13m read
Traditional Debugging in ObjectScript

Finding errors in your code or examining unexpected behavior is the main purpose of Debugging
I will try to refresh the traditional tools away from the helpers you have in Studio, VScode, Serenji, ....
to the basics which have been there before your preferred EDI used it in the background.

19 10
3 1.1K
Article
· Jul 4, 2020 4m read
Editor Archaeology

During the development of the Terminal Multi-Line Command Editor I discovered in my IRIS installation
a piece of software that I just can classify as a historic artifact. And it is still fully operational !!!

As it dates back to times before InterSystems was founded in 1978 you may understand my surprise.
I personally stepped into that environment in 1978 and used it then for daily work.

16 5
0 276
Article
· Apr 25, 2020 2m read
Static WHERE Conditions

The typical WHERE condition in SQL relates mostly to some content of the rows you work on.
So it needs to be calculated and checked for each row you access.
Differently (and that's why I named it STATIC) is a WHERE condition that is independent of the rows you access.

14 2
1 483

As you know in Caché / IRIS you have the possibility to define a property as Multidimensional as documented here:
https://docs.intersystems.com/iris20201/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_proplit#GOBJ_proplit_multidim
and the explanation of how to use it
https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=GOBJ_proplit#GOBJ_proplit_multidim_values

Though the access is quite comfortable (in traditional COS sense) there are 2 main restrictions that hurt:

#1) It is not saved to disk unless your application includes code to save it specifically.
#2) It cannot be stored in or exposed through SQL tables
there are some more
I'll show how to overcome these limits

14 1
2 531

I'd like to share with you some storage features that also exist in Caché but are almost
unknown and mostly not used. They are of course available in IRIS and gain importance
with large and distributed storage architectures.

14 0
0 403
Article
· Dec 9, 2019 1m read
SUDOKU demo

A demo in traditional style COS

This was written based on a previous trial in .XLS
It is far from being perfect. Rather a challenge for
improvement in all directions (code, interface, ...)
So anyone feel invited to make it better.

13 0
0 546
Article
· May 29, 2019 1m read
Simple Remote Server Control

This example is extracted from a long-running installation.
The purpose is to have simple monitoring of several servers at a rather primitive level.
Just slightly more intelligent than a raw PING. But still easy to integrate.
It avoids the overkill of information you are often confronted with while you are just
interested in the number of active processes or similar basic figures.
The example shows a basic skeleton that might be easily filled by your real needs.

It consists of 3 sections:

13 0
2 540

We are ridiculously good at mastering data. The data is clean, multi-sourced, related and we only publish it with resulting levels of decay that guarantee the data is current. We chose the HL7 Reference Information Model (RIM) to land the data, and enable exchange of the data through Fast Healthcare Interoperability Resources (FHIR®).

13 2
1 655
Article
· May 30, 2019 2m read
BackgroundJobs over ECP

Running a Background Job using the JOB command is a well-known feature.
Using ECP to distribute databases to several servers is also well-known.
But using the combination of both to run a process on a different server
seems to be a rare case.

Sure there are enough other ways to start a remote job, but the special
combination with ECP where the application server starts a process on a
data server without additional networking is worth to be remembered.

13 0
1 583
Article
· Mar 2, 2023 4m read
Tutorial - Streams in Pieces

This tutorial is a follow on to Working with %Query
It was displaying the content of the input stream chopped in fixed-size chunks.
But often those streams are structured and have well-defined separators (e.g HL7)
So as a side subject of this tutorial, this chapter shows how to break a stream into PIECES.

It is exactly the same idea as the $PIECE() function for strings with some add-ons.

12 1
1 305
Article
· Apr 26, 2020 5m read
Materialized Views

A VIEW in SQL is basically a prepared SQL statement.
It has to be executed and assembled like any other SQL query.
MATERIALIZED VIEW means that the content is collected before hands and can be retrieved rather fast.
I saw the concept first with my favorite competitor named O* and they made a lot of noise about it.

{ favorite: because I could win every benchmark against them devil }

12 3
1 710
Article
· Feb 26, 2018 2m read
M:N Relationship

If you have worked with Caché Objects,
You know already all about Relationships (one:many , parent:child) ...
But you will not find a word on many:many relationships in the docs.

But I met the question quite often from new adopters of Caché objects:
"Is it possible to implement many:many relationships ?" YES - of course !

12 7
0 1.1K
Article
· Jun 5, 2019 1m read
Using Interjob Communication (IJC)

Earlier I've written about command pipes.
This is the internal variant of a PIPE.

To make this more tangible and visible for you I prepared a small example
The scenario is to run a monitoring process that receives
input from an unknown number of sensors. (Could be Lab equipment or similar.)

12 0
0 401
Article
· Nov 21, 2020 3m read
ObjectScript over ODBC

Every now and then you may encounter a situation where for various reasons
ODBC is the only option to access a remote system. Which is sufficient as long as you need to examine or change tables.
But you can't directly execute some commands or change some Global.

Special thanks @Anna Golitsyna for inspiring me to publish this.

11 0
0 497
Article
· Jul 20, 2020 2m read
SPOOL as SQL Table

It is a classic Global Mapping exercise presenting ^SPOOL as Class / Table

Background

Device #2 named SPOOL dates back to the predecessors of Caché and IRIS
It was the first "%Stream" like option to buffer output before printing.
It is also the first and till today the most simple way of output redirection.

Solution

This is also an example of a mapped Global.
USE 2 redirects the output into the Global ^SPOOL

11 0
0 328
Article
· Jul 29, 2020 5m read
SQL for ^ERROR Global

Standard error logs in IRIS / Caché / Ensemble are written global ^ERRORS.
As this piece dates back some decades back to previous millennium its structure
is far from the typical SQL storage structures.

11 16
3 824

Hi Community,

Please read this when you have the time and keep an open mind. Also, you are welcome to tell me it is a terrible idea.

The main reason for this post

If you look at NPM, it has 1.3 million packages. Now ask yourself, is this an achievement or a nightmare?
How many of those packages are no longer supported?
How many of those packages break compatibility on version changes?
How do you know which one to use?

11 13
2 219

Hi all, it's finally time for the next release of VSCode ObjectScript extension. So what's new in this release.

  • Debugging support, for classes, routines and attach to a running process
  • Files in Server Explorer now can be edited

  • Added more details about connection errors

  • Improvements in Server Explorer build tree

  • Fixed memory leak when exporting large amount of files
  • Server view can be opened in explorer as virtual file system with schema `isfs://`
  • Option to suppress popup information message about successful compile, ("objectscript.suppressCompileMessages": true)
  • Export, addCategory setting have more flexibility in naming category for exported items
  • Formatting for commands and functions, as Word, UPPER or lower
  • Some improvements in syntax highlighting
  • Some other small fixes

10 16
3 1.5K