go to post Robert Cemper · Sep 14, 2020 BIG THANKS to @Dan Pasco for sharing this example: The test is simple - I am running in the 2020R1 instance, namespace USER and there are no classes runnable in this namespace - just a clean, new install. I have several other instances running, all different versions/build numbers. I am testing against my XDBC instance which is currently labeled as 2020.4 (obviously not yet released but the IRIS Native code is essentially the same as in 2020.1). The XDBC instance is listening on port 51780. First, proof this doesn't work locally. USER>write ##class(Sample.Person).CurrentAge($h-35000) WRITE ##CLASS(Sample.Person).CurrentAge($H-35000) ^ <CLASS DOES NOT EXIST> *Sample.Person And then, attempt the same function using the IRIS Native connection to the XDBC instance. USER>set host="localhost",port=51780,namespace="USER",user="_SYSTEM",pwd="SYS" USER>set connection = ##class(%Net.DB.DataSource).CreateConnection(host, port, namespace, user, pwd) USER>set iris = connection.CreateIris() USER>write iris.ClassMethodValue("Sample.Person","CurrentAge",$h-35000) 95
go to post Robert Cemper · Sep 14, 2020 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.
go to post Robert Cemper · Sep 14, 2020 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.
go to post Robert Cemper · Sep 14, 2020 some ideas from the hip: classic SOAP service running a background job over ECP having a listening job that triggers whatever you need using WebSocket communications 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.
go to post Robert Cemper · Sep 14, 2020 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.
go to post Robert Cemper · Sep 14, 2020 After a lot of troubles around variable scoping in past I try to avoid embedded SQL wherever possible.
go to post Robert Cemper · Sep 12, 2020 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.
go to post Robert Cemper · Sep 12, 2020 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.
go to post Robert Cemper · Sep 11, 2020 I have no idea if VSCode can do it???? @Dmitry Maslennikov ???
go to post Robert Cemper · Sep 11, 2020 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.
go to post Robert Cemper · Sep 11, 2020 once your debugger is attached to a process you press ALT+4 /(Watch Window) sorry, have just my German version at hands next you type the variable you want to see and it gets updated at every step see “Using the Studio Debugger.” details Watch Window
go to post Robert Cemper · Sep 11, 2020 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 compileror 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 . more on INSERT and variations
go to post Robert Cemper · Sep 11, 2020 Confirm #2) it was not a good idea for starting with containers
go to post Robert Cemper · Sep 11, 2020 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.
go to post Robert Cemper · Sep 11, 2020 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
go to post Robert Cemper · Sep 6, 2020 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
go to post Robert Cemper · Sep 5, 2020 simply NO! no OS would allow this.1 port = 1 listenerbut 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
go to post Robert Cemper · Sep 3, 2020 The Native API connects to IRIS by starting a background JOBIn 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. %ZSTART ; User startup routine.#; cannot be invoked directly quit SYSTEM ;#; InterSystems IRIS starting quitJOB ;#; JOB'd process begins new ipaddr,halt set ipaddr=$system.Process.ClientIPAddress() set halt=(ipaddr="172.17.0.2") set ^%CHECK($I(^%CHECK))=$lb(halt,$job,$ZDT($zts,3,,3),ipaddr,$znspace,$io)#; add here all checking for allowed IP Address #; halt if access is not allowed if halt halt quitCALLIN ;#; connect over CALLIN quitLOGIN ; quit This is a test result with Studio and 2 Native API. One blocked and the other allowed. ^%CHECK=5^%CHECK(1)=$lb(0,"15044","2020-09-03 16:22:54.667","192.168.0.9","USER","|TRM|:|15044")^%CHECK(2)=$lb(0,"17100","2020-09-03 16:23:41.247","192.168.0.9","%SYS","|TCP|51773|17100")^%CHECK(3)=$lb(0,"9880","2020-09-03 16:24:20.612","192.168.0.9","%SYS","|TCP|51773|9880")^%CHECK(4)=$lb(1,"19544","2020-09-03 16:24:41.925","172.17.0.2","%SYS","|TCP|51773|19544")^%CHECK(5)=$lb(0,"3268","2020-09-03 16:25:27.691","172.17.0.3","%SYS","|TCP|51773|3268")