go to post Chris Stewart · 16 hr ago Just a note for reference in future. The DynamicAbstractObject functionality was fully implemented in Caché 2016.2 and up (there was a version in 2016.1, but the syntax is different). If you are on a higher version that this, using it is generally preferable to the ZENProxyObject version
go to post Chris Stewart · Sep 19 Not sure if this is quite matching your use case, but OPEN and USE are what allow for redirection of standard Input and Output Docs are at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
go to post Chris Stewart · Sep 9 Thanks for all of the contributions Ben, and I share your anticipation of the return of the socks!
go to post Chris Stewart · Sep 3 Hi Water These processes should generally clean themselves up. Once processing is finished, they shouldn't be consuming resource, and the EVTW state is due to the staying online for any further requests to WorkQueueManager https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls... I think you could probably just leave these alone
go to post Chris Stewart · Aug 13 The DB mappings go from least to most specific, so you could have a set such as GLOBAL* - GlobalsDB GLOBAL.PKG* - PackageDB GLOBAL.PKG.Excluded* - GlobalsDB There is a bit of management overhead in this as you start getting more specific, but this should work
go to post Chris Stewart · Jun 18 It was great to see the Developer Community team! I'm proudly wearing my new Dev Community socks today
go to post Chris Stewart · Jun 14 The following SQL should do it CREATE UNIQUE INDEX ON TABLE <table> (field1, field2) You will then want to stop all operations against the data and build the index
go to post Chris Stewart · Jun 14 That time format isn't an inbuilt function for IRIS, so for this, you can adapt the string function above. Take the piece before the . (as your expected output doesn't include it), then strip all non numeric set output = $ZSTRIP($PIECE(input,".",1),"*AP")
go to post Chris Stewart · Jun 13 Hi Krishnaveni There are 2 answers to this. The easy but wrong way , and the more correct way The easy way would be to take the piece of the string before the space character, and then remove all nonNumeric chars set output = $ZSTRIP($PIECE(input," ",1),"*AP") The better was is to convert to the canonical date format, then convert back to the format you want. Relevant documentation page: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls... set internaldate = $ZDATETIMEH(input,3) set outputdate = $ZDATE(internaldate,8)
go to post Chris Stewart · Jun 3 If you just want a very basic conversion (i.e. not converting to a canonical date type first), then this will work set dt = "2024-05-31T17:33:08+01:00" set formatteddt=$ZSTRIP($PIECE(dt,"+",1),"*WPA") write formatteddt 20240531173308
go to post Chris Stewart · Apr 18 So, there's 2 ways to read this, either we want an "exists" check, or following the SQL, we want a count of all instances. This snippet can be set to do either case based on the existscheck boolean. Ideally though, you would have an index defined, and this could be read much more efficiently than having to scan an entire global set count=0 set existscheck=0 //Set to 1 if we only want to find first instance set targetValue=1329 set key = "" for { set key = $ORDER(^DataTest(key)) quit:key="" if targetvalue = +$LG(^DataTest(key),2) do $INCREMENT(count) quit:existscheck&&count } w !,"Count value is "_count
go to post Chris Stewart · Mar 26 This one will incorrectly flag an entry being in both lists if it appears twice in 1 list. That may not be possible due to constrants elsewhere, but it's something to be careful about
go to post Chris Stewart · Mar 26 I haven't put a massive amount of thought into this so it might be garbage for time/space complexity.... Set y = "Red, Green, Orange, Yellow" Set x = "Purple, Black, Yellow, Pink" set x=$ZSTRIP(x,"*W") set y=$ZSTRIP(y,"*W") k ^||members for i=1:1:$L(x,","){ set ^||Members($P(x,",",i),1)="" } for j=1:1:$L(y,","){ set ^||Members($P(y,",",j),2)="" } //Now do a quick traverse of our members set key="" set both="" for { set key=$O(^||Members(key)) quit:key="" set key2="" set key2=$O(^||Members(key,key2)) if ($O(^||Members(key,key2))'="" set both=both_key_"," } w !,"These records are in both lists "_both