what will show the output of locale command in OS?
So, your filesystem may not accept Unicode. And you would need to convert Unicode to a more suitable codepage.
- Log in to post comments
what will show the output of locale command in OS?
So, your filesystem may not accept Unicode. And you would need to convert Unicode to a more suitable codepage.
So, you just need help in find the place in the class which cause an error?
I would suggest to try removing each class member one by one, until you’ll narrow it to one member, and maybe you’ll realize why it’s happening.
Well, just noticed the version you have, any chance to upgrade such an old version to at least 2016.2
I would not recommend using such undocumented functions like this. Instead, of this you can switch to something else. Like $system.OBJ.ExportUDL, or some other internal methods
##class(%Atelier.v2.Utils.TextServices).GetTextAsArray()
##class(%Compiler.UDL.TextServices).GetTextAsArray()
Yeah, sure, it's quite simple to do. JWT tokens contain three parts separated by a pointer sign.
All of those parts are encoded with Base64
Set token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
#; Extract parts of the token
Set $ListBuild(header, payload, sign) = $ListFromString(token, ".")
#; Decode and parse Header
Set header = $System.Encryption.Base64Decode(header)
Set header = {}.%FromJSON(header)
Write !,"header"
Write !,"alg = ",header.alg
Write !,"typ = ",header.typ
#; Decode and parse Payload
Set payload = $System.Encryption.Base64Decode(payload)
Set payload = {}.%FromJSON(payload)
Write !!,"data"
Write !,"name = ", payload.name
Write !,"iat = ", payload.iat As I said, you have to get it from your client, It's no publicly available anymore.
Most of the code related to OAuth2 in IRIS, supposed that you have configured OAuth2 Client, and uses this information to validate and extract data from the token. And this particular method will expect OAuth2 client with the name "demoresource".
I'm not sure how InterSystems supposed to get it worked together with IAM. But I have an example, of extracting data from the JWT token, without any configuration. Look at this code. In this class, I can generate tokens and validate them, as well as pass any data to generating tokens, and extract it. But it also uses a secret phrase to validate the token. And depends on the algorithm, it will require just a simple string as a secret phrase, or a public and private key.
And try the suggested JWT debugger, which may help you in understanding, what's exactly stored in the token and used algorithm for the key.
The guide is here . But in this case, you will need to get Caché distributive from your client.
If you are new to InterSystems, you should start with IRIS, which is the newest product, the replacement for Caché.
You can download the distributive here or through WRC if you already have access.
The installation process on Windows is quite simple, just run the installer, and press the buttons Next. It will be enough for the evaluation. You may look at the documentation, for the Installation guide.
Management Portal is a part of the default installation. And in windows, should be available from the menu by the InterSystems Cube icon in the tray.
And usually, the URL is something like this. The port can be different if you have more than one instance of Cache installed.
Do you mean the OAuth2 token?
If so, did you use the native OAuth2 support in Caché/IRIS?
This JWT Debugger may help to understand what's inside the token stored.
2917.1 the image is daimor/intersystems-cache:2017.1
and Dockerfile
https://github.com/daimor/docker-intersystems/blob/2017.1/Dockerfile
there are images for any version from 2014.1 to 2018.1
ObjectScript does not have such thing as an Interface. The only way to get something like this is to use Abstract class, with methods that throw an error, while not overridden.

On the Login page, it does not show IRIS Logo. IRIS just returns 404 for the icon, if it's present, after the first login, it appears in WebGateway cache and became available. And the same for any static files. The Security Audit shows this error.
<PROTECT>%Oid+3^%Stream.Object.1 ^IRIS.SM.Shard,/usr/irissys/mgr/
So, you may have something like this in your CSP file
<csp:class super="%CSP.Page,App.Utils">
By default, it has only %CSP.Page class, but you may have some other class, where you may the logic with method OnPreHTTPafter
Documentation about installation IRIS in macOS.
The easiest way to try it is to start it with docker.
docker run -d --name irishealth -p 52773:52773 store/intersystems/irishealth-community:2021.1.0.205.0
With installed docker when this command will successfully download the image, and starts IRIS for Health, you may try to open it, as usual by URL http://localhost:52773/csp/sys/UtilHome.csp, with default login and password, but will ask to change it.
For Ensemble
docker run -d --name ensemble -p 52772:52772 daimor/intersystems-ensemble:2018.1
But, be aware, that all your changes will disappear when the container will be stopped and deleted.
Are you sure, that the process was terminated?
You should check cconsole.log/messages.log
journal records, you should find there where transaction was started, you changed the data, check if change was really in transaction and any other records within the process, it should be commit or rollback.
In any case, when restart Cache, it should terminate any unfinished processes and rollback data.
It’s connected with a process, until it’s alive, transaction will be open. When process will be finished by any reasons, it should rollback any transactions left open.
Why would you need it with SQL?
RAR is proprietary format, I would recommend 7zip, which works even better, and for free
That’s interesting, somebody dislike that new ability?
With this language server in fact, it’s possible to add the ability to compile ObjectScript code to any editor which got the support for Language Server Protocol, and it includes even vim/neovim, emacs, and some other editors. If you would like to add this to any supported editor and need help, contact me.
Could you explain the term you used, Language Server?
Language Server now used for editors. And I see no reactions to it in your article. And InterSystems already implemented real language server for VSCode, and I have implemented one more for any other editor.
just set it to the local array or global, will sort it
set arr("cba")=""
set arr("abc")=""
zw arrSome example of code in Go
package main
import (
"fmt"
"os"
"strings"
"github.com/caretdev/go-irisnative/src/connection"
)
func main() {
var addr = "localhost:1972"
var namespace = "%SYS"
var login = "_SYSTEM"
var password = "SYS"
connection, err := connection.Connect(addr, namespace, login, password)
if err != nil {
println("Connection failed:", err.Error())
os.Exit(1)
}
defer connection.Disconnect()
// Kill ^A
connection.GlobalKill("A")
// Set ^A(1) = 1
connection.GlobalSet("A", 1, 1)
// Set ^A(1, 2) = "test"
connection.GlobalSet("A", "test", 1, 1)
// Set ^A(1, "2", 3) = "123"
connection.GlobalSet("A", 123, 1, "a", 3)
// Set ^A(2, 1) = "21test"
connection.GlobalSet("A", "21test", 2, 1)
// Set ^A(3, 1) = "test31"
connection.GlobalSet("A", "test31", 3, 1)
var globalFull = func(global string, subs ...interface{}) string {
return fmt.Sprintf("^A(%v)", strings.Trim(strings.Join(strings.Split(fmt.Sprintf("%+v", subs), " "), ", "), "[]"))
}
var queryGlobal func(global string, subs ...interface{})
queryGlobal = func(global string, subs ...interface{}) {
for i := ""; ; {
if hasNext, _ := connection.GlobalNext("A", &i, subs...); !hasNext {
break
}
var allSubs = []interface{}{i}
allSubs = append(subs, allSubs...)
hasValue, hasSubNode := connection.GlobalIsDefined("A", allSubs...)
if hasValue {
var value string
connection.GlobalGet("A", &value, allSubs...)
fmt.Printf("%v = %#v\n", globalFull("A", allSubs...), value)
}
if hasSubNode {
queryGlobal("A", allSubs...)
}
}
}
queryGlobal("A")
}Btw, this project is written in Go, and uses a freshly developed go-irisnative project, as a connector to IRIS. With Go I can read and change data directly in globals, execute SQL, and work with objects.
As in Studio, in VSCode there is a command, View Others, with hotkey ctrl/cmd+shift+V
Those symbols in any way do not exist in Windows-1251 at all. You can store it in CP866 or UTF-8 only