Robert Cemper · Sep 2, 2020 go to post

@Oliver Wilms 
#1) make  sure your ECP Server is willing to accept ECP AplicationServers: 

#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=1

see 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 - Normal

see docs: class SYS.ECP

#4) now in SMP:

Robert Cemper · Sep 1, 2020 go to post

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. 

Robert Cemper · Sep 1, 2020 go to post

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.

Robert Cemper · Aug 31, 2020 go to post

make sure your / is really just a / and not surrounded by some nonprinting stuff
do a check e.g on https://www.xmlvalidation.com/ 

(ending at line 1 character 183)  could also mean you are missing
<?xml version="1.0" encoding="UTF-8"?>  as first line.

next possible trap: your xml is not encode in UTF-8  (but in some other [windows?]
code after modification with Notepad.exe or similar.

Robert Cemper · Aug 31, 2020 go to post

very quick:  $DATA() returns:

  • 0 no node, no data
  • 1 node exist and has data
  • 10 node exist has descendants but no data
  • 11  node exist has descendants and has data

# is the modulo operator and #10 means you just get the rightmost part of the $Data() result : 1 or 0 (true/false)
So $Data(^EDLIST("DIAG",code),value)#10 means: If the node has data than the content is in  value.
otherwise value is useless, skip it

Robert Cemper · Aug 31, 2020 go to post

@Evgeny Shvarov 
I appreciate that process with  HUMAN verification. 
And there was never any issue with the other  35 applications.
As a massive user, I state:  II is just OK as it is !  Pls. don't change!
 

Robert Cemper · Aug 30, 2020 go to post

OK.
There was no quick shot from the hip out of the community to help me.
So I went to dig into the subject myself and found an acceptable solution.
The result is now available on Open Exchange and it is also LINUX / UNIX aware and not just for windows

Robert Cemper · Aug 29, 2020 go to post

A test with 102,794 rows confirmed the performance difference.
#1)  on index xitm
Rows selected: 61320 Global Ref: 488,861 Commands: 5.244,585 Cached Query: %sqlcq.CACHE.cls16

#2) on index ycol
Rows selected: 61320 Global-Ref: 133,812 Commands: 3.909,205 Cached Query: %sqlcq.CACHE.cls13 

Reducing the query output to SELECT COUNT(ID) makes the difference even more dramatic
#1) Performance: 0.457 sec  Global-Ref: 574,193 Commands: 2.138,695
#2) Performance: 0.082 sec  Global-Ref: 205,973 Commands:   724,288

Robert Cemper · Aug 27, 2020 go to post

This might make your task easier

^EDLIST("DIAG", "X123")=" internal health"
^EDLIST("DIAG", "X234")=" External health"
. . . 

So you will need this Function / Method to Update your segment:
The class is just a container for the method

Class ED.Update [abstract] {
/// assumption you have the full Segment already in a string
ClassMethod AddDescription(ByRef segment as %String) as %Boolean
{  set code=$piece(segment,"^")
   if $data(^EDLIST("DIAG",code),value)#10 set $piece(segment,"^",2)=value
        quit $test }
}

now all you have to do

/// ...  get the segment from DG1
    if  ##class(ED.Update).AddDescription(.segment)  {
          /// .....Update the segment in DG1
   }

If the code is not defined you just skip the update

Robert Cemper · Aug 27, 2020 go to post

"plan to load into a global"

in which way?  straight global, class, .. ??? pls. explain

Robert Cemper · Aug 26, 2020 go to post

Try:

Class test.Person Extends (%Persistent, %XML.Adaptor) { 
Property Id As %Integer [ Calculated, SqlComputeCode = { Set {*}={%%ID}}, SqlComputed ];
Property Name; 
}

if you don't want to touch the Class you may inherit it from some common Super-Class. 

Robert Cemper · Aug 24, 2020 go to post

With pure routines, this is an almost impossible attempt.
Since DO doesn't  have a differentiator between calling a function or procedure, internal or public or just looping  [ do {}  while ]

If you do it inside a class you have all this information on functions and procedures in %Dictionary.*
So you can define exactly what you search. And using the code generator you may even do it at compile time.

Robert Cemper · Aug 17, 2020 go to post

The most simple way  is to redirect your I/O to a TCPport where another job provides you with the expected input:
#1) have a listener:  (any port, I use 7777 for the example)

set listen="|TCP|7777"
open listen:(:7777):0  if '$test write "port busy",! quit
use listen read request
while request'="/*  your end condition */" {
    /* match request for correct reply */
    write reply,!

        }
close listen
     

#2) at your report side all you have to do is

set server =  "|TCP|7777"
open server:("127.0.0.1":7777):0
if '$test write "port busy",! /* termination sequence */ quit
use server

/* launch your program */

here the listener sits on the same machine but it could be any reachable IP-address.
the only critical point is if your program fiddles around changing $IO

 

Robert Cemper · Aug 17, 2020 go to post

it is not possible within the same class as you break the uniqueness of names.

But if you have class A1 with Method MX(....)  
you can create class A2 Extends A1 and overload Method MX as you like or need.
You still can call MX of class A1 from class A2 using ##super()

All with the assumption that neither class A1 nor Method MX is FINAL

Robert Cemper · Aug 15, 2020 go to post

Did you consider to run that single app on IRIS and connect to your Caché over ECP ?
It works in both directions.

Robert Cemper · Aug 13, 2020 go to post

newSpeak [Orwell 1984} :  ISOS   - accepted  wink.  or ISCOS ?   pls. not IOS !!  
Not that I  used BASIC more than for a quick 5 line demo. It is still visible in Studio.
 
the most remarkable feature: it compiles directly to  .obj code without touchable intermediate code (.INT) 

Robert Cemper · Aug 13, 2020 go to post

@Yuri Marx 
Thanks for the quick improvement!
Question:
Is it possible to have some link behind the boxes ?
What I  have in mind is a fast directory into Documentation, Subjects in DC, Learning & Training, ...
If all 3 three (or more) have it in common as a starting point,
then search for help and information could become quite easier.   

Robert Cemper · Aug 12, 2020 go to post

A nice colored table but I miss almost all internal used languages:

COS is hidden as "Obs", 
BUT: No BASIC, NO MultiValue, No HTML, No T-SQL / ISQL, no sign of any kind of  Networking 
Also, Globals as THE core store technology seems to be lost. 
  
 

Robert Cemper · Aug 11, 2020 go to post

You are right.
but if the docs were that clear and resistant to misinterpretation,
this forum would be rather poor.

your question helps others to understand.

keep asking!