pls. place this in a separate question to make it public to others
- Log in to post comments
pls. place this in a separate question to make it public to others

Pls. click Accepted answer to confirm solution
BTW: We appreciate feedback too ! Thanks !
Hi Ben,
Thanks for keeping this. I lost my collection.
I remember so well how much fun we had making the icon for Hermes
- DeepSee2 (does anyone remember there was a DeepSee1 ?)
- HealthShare (getting the Aesculap snake in place)
for this cases a possible solution could be
%Stream.Global has a FindAt method that could give you a position of "\u00"
[Find the first occurrence of target in the stream starting the search at position. ]
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
But: if you are on the decoded stream all non printables are just single characters. No issue to cut it in pieces
I guess the whole code is shorter than this description.
I'd suggest not to touch the global under the source steam.
The default for %String is MAXLEN=50
if you write in your definition %String(MAXLEN="") also in Method calls this should be enough.
Query Methode(data1 As %Library.String(MAXLEN=""), data2 As %Library.String(MAXLEN=""), data3 As %Library.String(MAXLEN="")) As %Library.Query(CONTAINID = 1, ROWSPEC = "Result,Par2:%String") [ SqlProc ]
and so on.
Or you make you own data type inheriting %String overwriting Parameter MAXLEN=""
Or just use %Library.VarString which makes just this MAXLEN=""
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
Query Methode(data1 As %LibraryVar.String, data2 As %Library.VarString, data3 As %Library.VarString) As %Library.Query(CONTAINID = 1, ROWSPEC = "Result,Par2:%VarString") [ SqlProc ]
and so on.
of course it makes sense!
but then you know which application is using it and can use the application's cleaning method / routine that takes care of all kind of dependencies:
I remember well times when routines used to start with KILL ^CacheTemp*($JOB)
I expected over time most applications are using PPG (^||myGlobal...) to avoid this. Or have a Clean-Up.
It's the task of the application that uses ^CacheTempUser.* to take care of the housekeeping.
I found no traces that it belongs to Caché System Management and Operation.
So for a first check if this is the only issue just throw the full string into a $TRANSLATE$tr(jsonstring,$c(26)) and whipe it out.
e.g.
ZNAMESPACE "%SYS"
be careful !
Last comment from Ken holds his final solution.
use Class %Regex.Matcher it finds the control chars and can replace it .e.g. ""
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
there isn't much doc around.
it's also used for "Find in files"
a little bit in debugging
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
Hi Evgeny,
IF you can afford a short OFFLINE state:
#5) dismount DB / copy of cache.dat to a fast local device / remount it
move the copy in a secure place: #2, #1
ELSE IF you have to remain online all the time:
#3) on fast local device + move backup in secure place by #2,#1
NEVER #4) a fair chance for massive inconsitency
Robert
[semper fidelis]
double dot ..property is the shortcut for $this.property in instance methods.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
Great explanation of the issue. Thanks!
So we have an nice example what Proleptic Gregorian Calendar used for $H calculation means:
And that's definitely not correct as you demonstrated very precisely.
But is common use in most programming and DB systems.
But the date as such is questionable for 2 reasons
So Oct.12 is most likely a date back calculated by historians hundred years later .
So we should interpret this date as an common agreed convention that by luck was Friday.
Thanks again for the contribution.
You are right, the A -B -C case isn't covered by me:
not a goal but an assist (half points
)
It's possible but counter productive
since: if you switch off journal this get's logged in Audit and generates at least 1 entry in journal
and swicthing it back on for the rest of your application you get another entry.
I just don't recommend things with negative impact on performance.
Anyhow IF you insist it's your fate:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
You may do it as well with SQL
Result : 2 both classes contained in class
| cnt | ID |
|---|---|
| 2 | %BI.Blog |
| 2 | %BI.BlogPost |
| 2 | %BI.DashBoard |
| 2 | %BI.DetailList |
| 2 | %BI.DocMag |
| 2 | %BI.ImageList |
| 2 | %BI.KPI |
| 2 | %BI.ListField |
| 2 | %BI.Measure |
| 2 | %BI.PerfMet |
| 2 | %BI.PerfMetNode |
| 2 | %BI.PivotData |
| 2 | %BI.PivotTable |
For Regex you have
$LOCATE
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
$MATCH
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
and %Regex.Matcher
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
YES, map it to a namespace where Journal is disabled
switching on/of journalling at every write is overhead and fills the audit log that is journalled itself
I'd suggest in this case to take the original JSON String from Request.HttpResponse.Data
and split it by "LineNumber":
eg:
and you get
line=3
line(2)=0
line(3)=1
I admit it's not very object-ish but efficient
your private google search service delivered some material.
[this is not a standard service]
Athanassios,
I googled some time around Python console:
It is single threaded.
But your expectations seem to be that the behavour is like a terminal.
To achieve this your have to run 2 Phyton consoles / shells as you required 2 Terminals.
a) 1 passive to receive messages from WRITE see attaches example starting before b)
b) 1 active to trigger action in Caché
Your initial code from your questions using the Caché Phyton binding covers b) OK!
for a) you may use a listener similar to this Phyton example with the correct port, buffer,... ToDo
1 #!/usr/bin/env python
2
3 import socket
4
5
6 TCP_IP = '127.0.0.1'
7 TCP_PORT = 5005
8 BUFFER_SIZE = 20 # Normally 1024, but we want fast response
9
10 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
11 s.bind((TCP_IP, TCP_PORT))
12 s.listen(1)
13
14 conn, addr = s.accept()
15 print 'Connection address:', addr
16 while 1:
17 data = conn.recv(BUFFER_SIZE)
18 if not data: break
19 print "received data:", data
20 conn.send(data) # echo
21 conn.close()Dashboards are always fresh calculated.
Compare the performance in .NET to IE. It should be rather close to each other being based on similar technology.
If there is a significant difference then you dig at .NET end (buffers, ...)
If Chrome is significant faster then IE it's most likely the faster JS engine in Chrome.
Next you could look into global buffers of Caché and concurrent use of the Caché instance.
And (rarely) the complexity of your dashboard
Hi Athanassios,
you can not run the sender code in the same terminal as the receiver code
you have to use 2 terminals:
Terminal #1) start receiver. This simulates your Phyton Console
now you wait for something to be sent:
#Terminal #2): run sender
for this test it's essential that the sender finds a receiver waiting for input. Probably the same issue with PhytonConsole?
It's like real life: If nobody listens, your words are lost.
And it has to happen at the same time.
The ouput goes to port 4200. That works with Caché. (see test code)
Attention: The ! at the end of the WRITE is important as it triggers the send.
in SAMPLES it is at the beginning: So you just get an empty line. and rest remains in buffer.
You may also add WRITE !! before the CLOSE to flush the buffer and send an empty line for termination .
I have no knowledge on Python or PythonConsole but from your code I see no indication
where it starts listening at port 4200. pls. check.
Test code from Caché Terminal:
[ <READ> is the reaction to the connection CLOSE of the sender as I don't check termination ]
Sorry, I saw just that one Print method fromSAMPLES.
The redirect is especially required to convert a Write Command to a Write() Method and vice versa.
For "classic" devices as files , TCP, UDP, all kind of pipes ,SPOOL,Console, Teerminal,...all you find in Caché I/O Device Guide I just see no added value except fiddling around $P which I never had the need to do over 40yrs
you insert the object to itself ????
do context.MainObj.IssuesList.Insert(context.MainObj)
really ? does this make sense ??
I woldd expected something like:
do context.MainObj.IssuesList.Insert( tmpObj )
or
do context.MainObj.IssuesList.Insert(context.tempZenObj )
The parameters are defined all over here:
Searching for 'SERVICEINPUTCLASS' in 'Ens*.cls' (whole words,case sensitive) Ens.Enterprise.MsgBank.BankTCPAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS Ens.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.DICOM.Adapter.TCP.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.EMail.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.File.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.HTTP.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.Pipe.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.SQL.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.TCP.CountedInboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.TCP.DuplexAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.TCP.FramedInboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.TCP.TextLineInboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS EnsLib.UDP.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS Found 13 occurrence/s in 13 file/s. Searching for 'SERVICEOUTPUTCLASS' in 'Ens*.cls' (whole words,case sensitive) Ens.Enterprise.MsgBank.BankTCPAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS Ens.InboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS EnsLib.DICOM.Adapter.TCP.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS EnsLib.HTTP.InboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS EnsLib.TCP.CountedInboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS EnsLib.TCP.FramedInboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS EnsLib.TCP.TextLineInboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS Found 7 occurrence/s in 7 file/s.
But there is no case where it is used.
Looks like "reserved for future use "