Robert Cemper · Aug 15, 2025 go to post

Well, you have to do it yourself.
Suggestion: Keep a list of the indices processed and skip all followers
For the list you need a small Stored Procedure that you add to
your SQL SELECT in the WHERE clause.

CREATE PROCEDURE SQLUSER.DUPL(value VARCHAR, id INTEGER)
RETURNS INTEGER
LANGUAGE OBJECTSCRIPT
{
 set used=$d(^||dupl(value))
 set ^||dupl(value,id)=$i(^||dupl(value))  
 quit used
}

And in the SELECT

SELECT id, sickindex, . . . . . 
FROM your.data 
WHERE DUPL(sickindex,id) < 1

As a side effect, you create a list of affected indices.
I used a PPG to avoid the need to clear it before use.
If you are interested in the duplicate, you need to change the global name
and add some cleanup before use  
 

Robert Cemper · Aug 15, 2025 go to post

Hi Jean,

Taking a look into ##class(%Library.PosixTime)  you see that you shouldn't be concerned on efficiency
It's pretty obvious that the implementation is missing a selectable precision.
so

  • set stripped = $P(str,".",1)

Is similar effective as 

  • set stripped = $E(str,1,19) 

It's not perfect but will be correct and lasting for almost the next 8000 years 😉

Robert Cemper · Aug 14, 2025 go to post

In SMP (System Management Portal), you step to EXLORER and then step into SQL
where you select your TABLE. and can rebuild index


Furthermore, every persistent class  has by default
• classmethod %BuildDeferredIndices
• classmethod %BuildIndices
• classmethod %BuildIndicesAsync
Next variant : use $SYSTEM.OBJ.ValidateIndices()
Details described here  Fix broken index 8 years ago, still valid
 

Robert Cemper · Aug 12, 2025 go to post

Due to limited practice in ZEN I transferred your example to straight CSP and JS

<html>
<head>
<title>Demo for David</title>
<script language="JavaScript" type="text/javascript">
function importExtract()
{
	var url='upload.csp' ;
	var options = 'popup,status=yes,scrollbars=yes,resizable=yes,width=750,height=250' ;
	newwindow=window.open(url,'UPLOAD',options);
    newwindow.focus();
	alert('back');
	}
</script>
</head>
<body>
<h3>Demo for David</h3>
<Input type="button" value="Import Client Consultation Extract"
         onclick="importExtract();"/>
</body>
</html>

in upload.csp I just added this BUTTON to the end ot the main form

	<button onclick="window.close()" style="width: 100px; height: 40px; font-size: 18px;"> Exit </button>
</form>
Robert Cemper · Aug 11, 2025 go to post

1.  Use $$DIR^TRACE(dir)  you haven't set a suitable directory
2.  Use $$ON^TRACE(5352)  ; the job you want to trace ==> open file
3:  USE $$OFF ^TRACE(5352) to stop trace ==> close file
4.Now ^TRACE should show the file

I traced my own studio session:

START:1810291850,0,%SYS.BINDSRV,2,1
STACK: [ 0] D - SuperServer+112^%SYS.SERVER +1
STACK: [ 1] D - SuperConnect+34^%SYS.DBSRV +1
STACK: [ 2] D - Dispatch+14^%SYS.BINDSRV +1
DO:1812736542,0,%SYS.BINDSRV,39
ARG:[ 0] INT: 0
ARG:[ 1] INT: 1
ARG:[ 2] INT: 1
DO:1812736624,0,%SYS.BINDSRV,625
ARG:[ 0] INT: 0
ARG:[ 1] INT: 0
DO:1812736631,0,%SYS.BINDSRV,258
ARG:[ 0] INT: 0
ARG:[ 1] INT: 0
QUIT:1812736638,291
DO:1812736642,0,%SYS.BINDSRV,627
Robert Cemper · Aug 8, 2025 go to post

Not sure for Caché 2017 
BUT
Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2018.1.5 (Build 659U) Mon Mar 22 2021 07:12:43 EDT
Has ^TRACE in %SYS
with enough $v(..) and $ZU(..) to look promising 

 W $ZU(5)
%SYS
%SYS>D ^TRACE
 
TRACE utility for Cache. You can signal a process to write a record of all
procedure, function, or subroutine calls to a file. Then use this utility to 
interpret and display the trace. The trace file is named: CacheTrace_'pid'.txt 

Use $$DIR^TRACE(dir) to set the directory where the file(s) should be written
(process must have create/write access to the directory). $$DIR^TRACE() returns
the current directory for trace files. 

Use $$ON^TRACE(pid) to start the trace and $$OFF^TRACE(pid) to end the 
recording. Then just run ^TRACE to see the results. 

Process ID for trace file: 
Robert Cemper · Aug 8, 2025 go to post

So  %SYS>d ^TRACE might be a useful start

This utility traces the execution of a process.  Traced processes write events
to a trace file with details about the routine line where the event occurred
and, if applicable, the global reference.  The events available for tracing
correspond to the metrics availabe in performance monitoring tools (PERFMON,
%SYS.MONLBL etc).  Raw data is written to iristrace_<pid>.txt in the
configured directory, and is then parsed and displayed by this utility.
 
 
Trace file directory:   not set
Trace file size limit: unlimited
Trace events selected:  RtnLoad, GloRef, BlockWait, NCacheMiss, DirBlkRd
   UpntBlkRd, BpntBlkRd, DataBlkRd, BdataBlkRd, MapBlkRd, OthBlkRd
 
1) Configure Trace
2) Trace Process (Foreground)
3) Start Background Trace
4) Stop Background Trace
5) Display Trace Files
6) Delete All Trace Files
 
Option?
Robert Cemper · Aug 7, 2025 go to post

If I understand it right, you do not just expect a tracking down to some point, 
but also a history of all up and down you did from a certain starting point.
Similar to a TCP traceroute 

Robert Cemper · Aug 4, 2025 go to post

The feedback button is not available for Python and for Node.js.
These were my 1st broken examples
 

Robert Cemper · Aug 4, 2025 go to post

AH,  That was meant by feedback
Which is easy now, as it wasn't a bug but an explicit feature

Robert Cemper · Aug 4, 2025 go to post

It might be great to remove the related refences also
from official documentation
Py
https://docs.intersystems.com/components/csp/docbook/Python-Native/v1.0.0/irisnative.iris.html#irisnative.iris.function

Nodes.js
https://docs.intersystems.com/components/csp/docbook/NodeJS-Native/v2019.2/external-_intersystems-iris-native_.Iris.html

Java
https://docs.intersystems.com/iris20201/csp/docbook/DocBook.UI.Page.cls?KEY=BJAVNAT_call#BJAVNAT_call_function

.NET
https://docs.intersystems.com/iris20201/csp/docbook/DocBook.UI.Page.cls?KEY=BNETNAT_call#BNETNAT_call_function

Also Class reference for 2025.1
https://docs.intersystems.com/iris20251/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25Net.DB.Iris#Function

like this:
Calls a function (label^routine), passing zero or more arguments and returning the function's return value. Trailing arguments may be omitted, causing default values to be used for those arguments.

This method throws an exception when an error condition is encountered.

routineName

input

The name of the routine that implements the function to be called.

functionName

input

The name of the function to be invoked.

args

input...

The arguments to be passed to the method.

 

return

The value returned by the functionName function.


  • Such a misleading documentation roughly 1.5 years behind reality is not so impressive
  • It took days to find this out.  😖
Robert Cemper · Aug 3, 2025 go to post

quite an interesting hidden feature.

Though testing with _SYSTEM/SYS and %All, this had no visible impact
It is exactly 1 method that breaks in all 4 Nativ packages 
And with %All the rest is available anyhow and working fine.
 

BUT eventually %All is not All enough

Robert Cemper · Aug 1, 2025 go to post

Thanks for the input.
A good idea to put the demo in a separate repo
It is just not directly obvious from OEX
works fine, and module.xml looks good. Review placed 

Robert Cemper · Jul 21, 2025 go to post

>> Naming in ObjectScript has a historic background 
In the beginning, the grand-grandfather of IRIS was a full-stack operating system
And it was running on machines with only 64 KBytes of memory
So saving space in memory was the highest virtue of a developer then.
Consequently, all names were as short as short could be.
Typically using single-character named variables.
And A was different from a to widen the available scope
Over the years, this was kept for backward compatibility and to decrease the fear of upgrades
And I have seen customers running 40+ year old code also in IRIS without any bit changed.

Robert Cemper · Jul 18, 2025 go to post

In your screenshot, I see 

$('<div>') simpledialog2(

But W3Schools says:
https://www.w3schools.com/Jquery/jquery_syntax.asp

Basic syntax is: $(selector).action()
  • A $ sign to define/access jQuery
  • A (selector) to "query (or find)" HTML elements
  • A jQuery action() to be performed on the element(s)

I didn't write JavaScript for decades, and I'm not an expert.
BUT: I fail to detect the point after the closing bracket
It was just my Studio that marked it as an error.

created with NPI

Robert Cemper · Jul 17, 2025 go to post

I wonder how you expect to know that your input is complete without any terminator.
And according to your example, you also don't have a fixed length:
Withoit an clear signal timeout seems to be the only way to know you are complete.
You may read input character by character without guarantee  
how do decide for 1 or 10 or 100 or 1000  ?
Some ending character (eg. not numeric) or a fixed length is required

Robert Cemper · Jul 17, 2025 go to post

Confirmed. I just checked:

  • containers.intersystems.com/intersystems/iris-community:2025.1
  • containers.intersystems.com/intersystems/iris-community:latest-cd

license valid to 4/6/2026

Robert Cemper · Jul 17, 2025 go to post

The correct syntax is &html <   your  content  >

I didn't detect the closing > in your screenshot

It generates:
Write "  your content  "
in the resulting .int code
Just the same as it did in Caché or Ensemble
created with NPI

Robert Cemper · Jul 16, 2025 go to post

My personal preference would be

  • verify Websockets with a js client (even in CSP)
  • then move it to IRIS with all hidden and default features if required at all.

You may check all the old WS examples in OEX

Robert Cemper · Jul 16, 2025 go to post

Hi 

your code
Set WebSoc=##class(%Net.WebSocket.Client).%New(WebSocURL,cre,evl)   
Just uses the Default %Net.HTTPrequest that contains url port, ....
But %New offers more
• Methode %OnNew(pURL As %String, pCredentials As %Net.WebSocket.ICredentials = $$$NULLOREF, pEventListener As %Net.WebSocket.IEventListener = $$$NULLOREF, pAcceptedProtocols As %String = "", pRequest As %Net.HttpRequest = $$$NULLOREF) als %Status
and in %Net.HTTPrequest you have a property port
https://docs.intersystems.com/iris20251/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&PRIVATE=1&CLASSNAME=%25Net.HttpRequest
I never needed it as protocol ws and wss was sufficient.
But there is no other place for a port to be assigned
 

Robert Cemper · Jul 16, 2025 go to post

You mentioned:

WebSockets are enabled on ports 80 & 443, but the code fails

Websockets work bi-directional
SO: Did you assign / map  those ports also in your docker-compose ?

Robert Cemper · Jul 14, 2025 go to post

Docker  build fails :

ERROR MESSAGE
! iris The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested 0.0s
✔ Container docker-setup-1

The required Platform is not mentioned as a Prerequisite

Is it also available for amd64 processors ?

Robert Cemper · Jul 11, 2025 go to post

Possible workaround:
 

$ListToString(%DLIST(DISTINCT(REPLACE(ARCIM_Desc,'<br/>',''))),'<br/>') as "ARCIM_Desc",