Article
· Jul 21, 2020 1m read
Snapshot to JSON

This is a sample to use %JSON.Adaptor class available in IRIS to produce a snapshot of your object.

The sample consists of 2 classes that are variations of what was known in Caché/SAMPLES as Sample.Person.
Be aware that the possibilities are limited by %JSON.Adapter and how you make use of it.

Once in place, you create some test data by Populate().
You select an object and take a snapshot.
You apply changes to your object and take another snapshot.
And see the difference.

BINGO!

10 0
0 637
Article
· Jul 20, 2020 1m read
Fast JSON formatting (IRIS)

t's also an example for a customized command extension (ZZJSON) in IRIS

IRIS has a nice %JSON.Formatter class.
But for debugging it is not really handy.
see:

ZWRITE js1  
js1="{""Name"":""Cunningham,John C."",""SSN"":""294-11-9150"",""DOB"":""1933-01-08"",""Home"":{""Street"":""4249 Ash Street"",""City"":""Tampa"",""State"":""MD"",""Zip"":""30176""},""FavoriteColors"":\[""White"",""Red"",""Green""]}"   

so you proceed for the most simple case

7 0
0 477
Article
· Jul 20, 2020 1m read
IRIS NativeAPI for Node.js compact

An all-in-1 package of the WebSocket MicroService Demo

To simplify the demo of the WebSocket-Micro-Server (WSockClientMicroSV)
the whole package is now bundled into a single Docker Image

How to use it

From the same terminal start the IRIS based client and prepare your orders

  docker-compose exec iris iris session iris %ZSocket

on WebTerminal it is simply

9 0
0 557
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 337
Article
· Jul 19, 2020 1m read
Organize ZLANG

The guide “Extending Languages with %ZLANG Routines”
Tells you all details you need to know to extend your programming language.
EXCEPT: How to do it in a clean way.

This example of a %ZLANGC00.mac may show a possible approach
to get an easy to overview and to manage setup.
With less than 50 lines of code you might not be affected.
But if your Studio shows close to 1000 rows or more you may get in troubles.

9 0
0 266
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 281
Article
· Jul 4, 2020 2m read
Terminal Multi-Line Command Editor

The Command extension enables the execution of Multi-Line Commands from Terminal prompt.

Terminal Multi-Line Input with Edit, Insert, Delete, Print extension for IRIS and Caché
IRIS and Caché have just single command lines in terminal available
This Multi-Line Commands Editor also will execute the Multi-line Commands.
In addition, it is independent of access to %SYS and can be installed in any namespace

Special thanks to @Jeffrey Drumm who inspired me to this and supported me as beta-tester.

8 1
0 1.2K
Article
· Jun 29, 2020 3m read
Terminal Multi-Line Option


The Command extension enables the execution of Multi-Line Commands from Terminal prompt.

Installation & Execution

Import %ZML.xml to Namespace %SYS

Optionally you may add this line to your %ZLANGC00.mac for a simplified use:

ZML do ^%zml quit  ; add multi line command in terminal

and
USER>zml

otherwise, just call it from the terminal command prompt

10 0
1 533
Article
· Jun 25, 2020 12m read
Backport %JSON.* to Caché

Attention:

This is a coding example working on Caché 2018.1.3
It will not be kept in sync with new versions 
It is also NOT serviced by InterSystems Support !

Full backport from IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:33 EDT

IRIS brought us an excellent %JSON.Package
It is an essential component of the Project Manager (ZPM)
This backport makes it available also in Caché and builds a base to eventually backport also ZPM.

14 5
0 450

When I start a fresh installed IRIS or a Container I always find Interoperabiliy (aka. Ensemble) mapped to namespace USER.

Is there any utility to remove this mapping by a click ?
unmapping it global by global, routine by routine, Package by Package is just a boring exercise.

To be clear: I look for a utility inside IRIS.

The external utility is obvious: Notepad (or any other text editor)
- clean iris,cpf,
- restart IRIS
It's fast, it's efficient, but it's really hardcore.

7 4
0 238