go to post Alexey Maslov · Feb 23, 2024 ^SPOOL(docIdx) approach allows spooling sharing across ECP network, while ^SPOOL($j) does not :) %IS is an utility which allows to choose devices by CHUI routines users and %SPOOL utility can manipulate with spool files opened using the %IS utility only. It seems that initial purpose of spooling facility has gone with such a users and such a printers (strictly character based, w/o ability of font selection, etc), while its usage still can be actual in rather exotic cases like this one.
go to post Alexey Maslov · Feb 22, 2024 Yeah, but it should be used with precautions. Let's see what happens when two processes access spooling device concurrently: USER>f {q:'($zh\1#20)} k a o 2 f i=1:1:10 {s a(i)=i*100} u 2 zw a c 2 ; process #1 USER>s i="" f {s i=$o(^SPOOL(1,i),1,line) q:i="" w line} ; look inside ^SPOOL(1)... a(1)=100 a(2)=200 a(3)=300 a(4)=400 a(5)=500 a(6)=600 a(7)=700 a(8)=800 a(9)=900 a(10)=1000 {66892,65205{11 USER>f {q:'($zh\1#20)} k a o 2 f i=1:1:10 {s a(i)=i} u 2 zw a c 2 ; process #2 USER>s i="" f {s i=$o(^SPOOL(1,i),1,line) q:i="" w line} ; look inside ^SPOOL(1)... a(1)=100 a(2)=200 a(3)=300 a(4)=400 a(5)=500 a(6)=600 a(7)=700 a(8)=800 a(9)=900 a(10)=1000 {66892,65205{11 As you can notice, one process's output suppressed the other's one. To avoid it, firstly RTFM: OPEN and USE Commands for Spooling Device, and implement some synchronization pattern, e.g. USER>f {q:'($zh\1#20)} s docIdx=$i(^SPOOL) k a o 2:(docIdx) f i=1:1:10 {s a(i)=i*100} u 2 zw a c 2 ; process #1 USER>s i="" f {s i=$o(^SPOOL(docIdx,i),1,line) q:i="" w line} a(1)=100 a(2)=200 a(3)=300 a(4)=400 a(5)=500 a(6)=600 a(7)=700 a(8)=800 a(9)=900 a(10)=1000 {66892,66645{11{ USER>f {q:'($zh\1#20)} s docIdx=$i(^SPOOL) k a o 2:(docIdx) f i=1:1:10 {s a(i)=i} u 2 zw a c 2 ; process #2 USER>s i="" f {s i=$o(^SPOOL(docIdx,i),1,line) q:i="" w line} a(1)=1 a(2)=2 a(3)=3 a(4)=4 a(5)=5 a(6)=6 a(7)=7 a(8)=8 a(9)=9 a(10)=10 {66892,66645{11{ Each process has got it's own output in ^SPOOL(docIdx) now. This approach works if every consumer of spooling facility follows the same pattern; incrementing ^SPOOL is just an easiest approach, while it would be better avoid touching system globals and increment something else according to your taste.
go to post Alexey Maslov · Feb 8, 2024 The same behavior is with ";" comments. It seems to be a new feature of InterSystems ObjectScriptv2.12.1:older versions acted similarly with "///" comments only. I'm not sure that this innovation makes our life worse, while having the way to switch it off would be useful.
go to post Alexey Maslov · Jan 31, 2024 Another possible solution is to write a small wrapper around curl.
go to post Alexey Maslov · Jan 9, 2024 I'd like to collect tables based on logs In general, such approach is far from optimal for Caché like databases because logs (which are usually called "journals" in Caché/M world) are being written on global (= lowest possible) level, disregard of data model used by an app (SQL, Persistent classes, etc). Reconstructing app level data from underlying globals can be a tricky task even for Caché guru. That was one of the reasons why colleagues of mine took another approach for close to real-time data export from Caché to external system. In a few words, they used triggers to form application level data packets on Caché side and pipe them to the receiver. This approach saved CPU time preventing its waste for filtering out unnecessary journal records and minimized cross-system network traffic.
go to post Alexey Maslov · Dec 18, 2023 $sequence can leave "holes" in numbering which can be undesirable in some cases, e.g. when meaningful IDs are assigned: it seems to be strange to have APP-DD-99 and APP-DD-101 without APP-DD-100.
go to post Alexey Maslov · Dec 12, 2023 Setting $ZTZ affects the current job only (the job, which sets $ztz), so there is no danger for other processes What about REST services or web apps? Isn't there one process possibly serving several clients' requests?
go to post Alexey Maslov · Dec 11, 2023 Robert, it sounds strange, but... Setting the Time Zone You can use $ZTIMEZONE to set the time zone used by the current InterSystems IRIS process. Setting $ZTIMEZONE does not change the default InterSystems IRIS time zone or your computer’s time zone setting. IMHO, $ztimezone setting is dangerous not for its system-wide effect (which it hasn't) but mostly due to its exclusions and anomalies, despite they are accurately listed in docs.
go to post Alexey Maslov · Sep 5, 2023 Hi Sylvain, Is it possible to publish more details of the scenario which showed such impressive figures?
go to post Alexey Maslov · Aug 8, 2023 My #1 choice would be: go to Management Portal -> Globals select globals as needed choose Export, then select browser instead of server then the .gof file will be downloaded to your local filesystem.
go to post Alexey Maslov · Aug 1, 2023 Both global traverse only 1st level in $order It seems that you are a bit confused with these levels. Globals are B* trees physically: all subscripts are concatenated into one key, therefore even when you logically traverse only 1st subscript, you traverse all of them physically.
go to post Alexey Maslov · Jul 30, 2023 my real global has more than 6-8 subscripts and takes 110 What is the result of write $$AllocatedSize^%GSIZE($name(^RealGlobal))/1024/1024 a similar global with 6-8 subscripts ... and takes only 15 to 16 seconds What is the result of write $$AllocatedSize^%GSIZE($name(^SimilarGlobal))/1024/1024
go to post Alexey Maslov · May 26, 2023 My question became a subject for investigation by WRC; let us wait for the results.
go to post Alexey Maslov · May 25, 2023 Meanwhile, such "numbers" are still evaluated as invalid ones: QMS>w $isvalidnum(txt) 0 Therefore, why the expression " if ("_txt_")" is evaluated as a valid one?Not to mention that an attempt to execute it provides usual <MAXNUMBER> error.
go to post Alexey Maslov · May 18, 2023 the first letter becomes the last letter, the second letter becomes the second-to-last letter, and so on This definition means string reverse rather than rotation, while you apparently meant right (or clockwise) string rotation which is:1st character becomes the 2nd, last ones becomes the 1st, repeat until the first string will become equal to the second string. As to your sample:hello -> ohell -> lohel -> llohe
go to post Alexey Maslov · May 11, 2023 Done, expecting that InterSystems ObjectScript was the right choice for the kind of issue.