Thank you @Dan Pasco
I just did a summary on the Class Ref.
I'll take a copy of your reply as an example for the audience.
- Log in to post comments
Thank you @Dan Pasco
I just did a summary on the Class Ref.
I'll take a copy of your reply as an example for the audience.
Hi, @Dan Pasco
Since what release does this exist.?
It never crossed my way and obviously nobody else reacted to these questions.
I found a first trace showing up in Class References of 2020.1 but it is even invisible in IRISlatest docbooks.
Big THANKS for uncovering this secret. ![]()
.png)
some ideas from the hip:
They all run over TCP as there is nothing else between separated servers.
At the bottom line, you rely on some code expecting a request.
"Native API" for various languages, or Studio, or CSP do the same over Super Server Port (1972)
the quality is different, not the principle.
IRIS compiles NOW embedded SQL totally different from Caché / Ensemble. (external Class)
Before you could run in all kind of problems if your host variables were not %* or declared in the global variable scope.
After a lot of troubles around variable scoping in past I try to avoid embedded SQL wherever possible.
Fully with you.
There are so many variants to let talk them to each other.
And on the same server there are enough other options.
It's not clear what you mean by "native".
This is one option. Background Jobs over ECP.
But as IRIS Servers also talk to each other over TCP I don't see any advantage over using a SOAP service or WebSockets or similar.
I have no idea if VSCode can do it?
??? @Dmitry Maslennikov ???
AHHH!
that sort of comfort isn't foreseen.
You have to type in the variable names.
But you see it when you move the cursor over the variable in the code window as "hoover"-text.
The Watch Window is useful if you have objects, or $LB structures, arrays, ... or obj.property.
Schönen Abend noch aus Wien.
once your debugger is attached to a process you press ALT+4 /(Watch Window).png)
sorry, have just my German version at hands
next you type the variable you want to see and it gets updated at every step
.png)
see “Using the Studio Debugger.”
details Watch Window
At first sight, the sequence of your values matches the sequence of your properties.
transforming your input from
fecha1|nombreProfesional1|centro1|secuencia1|hora1|bloque1|acto1|lug....
to
'fecha1','nombreProfesional1','centro1','secuencia1','hora1','bloque1','acto1','lug....
in an exercise for beginners.
Next I would use SQL to insert the record
INSERT INTO
EsquemasDatos_DragoAP.ConsultarCitas (fecha1,nombreProfesional1,centro1,secuencia1,hora1,bloque1,acto1,lug....)
VALUES ('fecha1','nombreProfesional1','centro1','secuencia1','hora1','bloque1','acto1','lug....)
An that's it!
Listing of the columns is only necessary if you distrust the class compiler
or if you want to prevent problems with later sequence changes in the class definition.
In any case, it should reflect the sequence of your data input, independent of sequence in class.
I'd suggest to use one of the ResultSet classes and avoid embedded SQL.
The whole SQL statement can be composed as a single string and then processed .
Confirm #2) it was not a good idea for starting with containers ![]()
Confirm. No Caché in containers.
I built one myself a year or more ago. Not real rocket since but quite some effort.
(late thanks to @Dmitry Maslennikov and @Luca Ravazzolo )
Now I'd position it as less rocket than before. But not really worth the effort.
I finally grabbed a VM instead for my "exercises".
Today I would just use WSL2 instead with a default Linux distribution.
I enjoyed it! reminds me of competitions on how to get some results by a minimum of characters. eg. list a global.
With expanding / compressing code I Studio [ <ctrl>E, <ctrl><shift>E ] this is all history
just reading it:
ERROR <Ens>ErrParsingExpression: Error parsing expression
'GenerateNACK("For NewBorn Msg, PID21 Mother Idendentifier should have MRN number",%ErrorStatus)':
0--------10--------20--------30--------40--------50--------60--------70--------80--^ 83 !!!
ERROR <Ens>ErrInvalidName: Invalid name at offset 83 >
either variable %ErrorStatus is missing or not an object of type %Status
Hmmm!
Sounds a bit exotic.
.png)
simply NO! no OS would allow this.
1 port = 1 listener
but you may build a listener dispatching to various services according to some content / signal you receive.
or using a kind of load balancer to distribute incoming messages
The Native API connects to IRIS by starting a background JOB
In namespace %SYS you can have access to every fresh started job.
The routine name is %ZSTART.mac.
You have to create it if not existing yet or to adapt it.
My example is just reduced to your case.
Writing a log in global ^%CHECK is just for testing.
I used Native API and also Studio for testing.
This is a test result with Studio and 2 Native API. One blocked and the other allowed.
@Nigel Salm A great example for the traditional approach
![]()
let's have your binary input in variable data
from the description there are 2 open points:
therefore I have added both variants
OK. there is a bunch of system utilities that are protected from studio.
Typically the real powerful and sometimes dangerous old stuff.
That's interesting:
How did you look for GBLOCKCOPY.int ? there never was a .mac!
And it is even on the news IRIS.
Instance: IRIS
USER>zn "%SYS"
%SYS>zl GBLOCKCOPY
%SYS>p
GBLOCKCOPY ; Fast global copy from database to namespace
; Copyright (c) 2020 by InterSystems Corporation.
; Cambridge, Massachusetts, U.S.A. All rights reserved.
; Confidential property of InterSystems Corporation.
n
i $p($g(^|"^^"_$zu(12)|%SYS("GBLOCKCOPY")),"~",1)'="1.0" k ^|"^^"_$zu(12)|%SYS("GBLOCKCOPY")
i '$d(^|"^^"_$zu(12)|%SYS("GBLOCKCOPY")) s ^|"^^"_$zu(12)|%SYS("GBLOCKCOPY")="1.0~"
s POP=0
w !,"This routine will do a fast global copy from a database to another database or"
w !,"to a namespace. If a namespace is the destination, the global will follow any"
w !,"mappings set up for the namespace."
;
MENU ;If this is missing you may also miss other important pieces:
Check your installation or reinstall it
This is a late reply and the content my explain why.
There is a set of available classes and methods to fulfill your requirements.
Though you have to be careful as there are side conditions to be considered that require special attention.
You have to wrap these class methods in some routine or class and then plug it into the standard task manager.
From your question I understand 4 different tasks:
The official documetation also has some examples.
My personal favorite is routine DATABASE.int in namespace %SYS
It covers all these functions for interactive use and illustrates also all possible requirements and limits in detail.
The labels you should check are:
COMPACT()
DBTruncat()
DEFRAG()
FileCompact()
This might also explain why there is not just a method out of the box.
Dear @Sylvain Guilbaud
As this is the oldest unanswered question I found I'll give it a try:
One of the most attractive features of DeepSee is its close link to the Caché (now IRIS) database using
the DSTIME mechanics for updates.
With an external linked DB you don't have this "built-in" support.
Other DB's have similar features but including them requires some "art work".
And that doesn't seem to happen so often.
On the other hand the question was never expired nor closed.
It might happen that new results (almost 5 years later) show up now as it moves to the front.
J'espère que tu vas bien et en bonne santé! ![]()
Salutations de Vienne,
Robert (toujours actif) ![]()
@Oliver Wilms
#1) make sure your ECP Server is willing to accept ECP AplicationServers:
.png)
#2) on your Application Server define your Data Server
%SYS>set Name="MainServer"
%SYS>set Properties("Address")="127.0.0.1"
%SYS>set Properties("Port")=1972
%SYS>s Status=##Class(Config.ECPServers).Create(Name,.Properties)
%SYS>zw Status
Status=1see docs: class Config.ECPServers
#3) connect to your Data Server
%SYS>set ecpstate=##class(SYS.ECP).GetServerConnState(Name)
%SYS>zw ecpstate
ecpstate=1 ;; Not Connected
%SYS>set tSC=##class(SYS.ECP).ServerAction(Name,3) ;; 3 - Change to Normal
%SYS>zw tSC
tSC=1
%SYS>set ecpstate3=##CLASS(SYS.ECP).GetServerConnState(Name)
%SYS>ZW ecpstate3
ecpstate3=5 ;; 5 - Normalsee docs: class SYS.ECP
#4) now in SMP:.png)
I'm not aware of a file size limit with NTFS.
ECP is the Enterprise Caché Protocol that can connect Caché / Ensemble / IRIS instances over the network.
To use it you require a multiserver license
WRC is the InterSystems Worldwide Support Center https://wrc.intersystems.com
So ECP might be even more interesting as you can copy directly to the target DB.
Instead of copy local, copy DB or file, load global.
At that moment what is the file system of your installation?
The 4GB limit did ring a bell in my head.
4GB is a significant amount.
A different approach could be to have just an additional DB (not journaled)
where instead of a loop you use MERGE to copy the global
MERGE ^|"newdb"| myGLOBAL = ^myGLOBAL
once your collection is done you dismount the deb and just copy it wherever you need it.
"newdb" is the extended Global reference. Either just the DB or a helping namespace.
So you can check exactly what data you move.
Of course, this works also across ECP if it is available.
see my article in dc and the related example on OEX