go to post Vitaliy Serdtsev · Mar 31 Initially, the question was asked in relation to Caché or/and Ensemble 2018.1, but not to IRIS.
go to post Vitaliy Serdtsev · Mar 14 $SYSTEM.Process.UserName(##class(%SYS.ProcessQuery).NextProcess(""))
go to post Vitaliy Serdtsev · Mar 13 Another solution via $LISTFROMSTRING: set s="item1" for i=2:1:5 { set s=s_",item"_i } set mylist=$listfromstring(s) zwrite mylist ; mylist = $lb("item1","item2","item3","item4","item5")
go to post Vitaliy Serdtsev · Mar 10 IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST Or "Include EnsUtil" Now you can do it like this: ##class(%BigData.ShardedSQL).ClassNameToTableName(pClassName)
go to post Vitaliy Serdtsev · Mar 10 USER>w $zv IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST USER>w $$GetEnvironment^%apiOBJ("collation","%Library.String",.collval),! zw collval 1 USER>w $$GetEnvironment^%apiOBJ("collation","dc.Username",.collval),! zw collval 1 USER>zn "%SYS" %SYS>w $$GetEnvironment^%apiOBJ("collation","%Library.String",.collval),! zw collval 1 %SYS>w $$GetEnvironment^%apiOBJ("collation","%Library.Username",.collval),! zw collval 1
go to post Vitaliy Serdtsev · Mar 10 Strangely, I had no issues with the %Library.Username type. I didn't explicitly specify the collation anywhere: neither in the data type class nor for the Namespace-wide. Namespace '%SYS': Class %Library.Username Extends %String { Parameter MAXLEN As INTEGER = 160; }Namespace 'USER': Class dc.Username Extends %String { Parameter MAXLEN As INTEGER = 160; } Class dc.a Extends %Persistent { Index is1 On s1; Index is2 On s2; Index is3 On s3; Property s1 As %String; Property s2 As %Username; Property s3 As dc.Username; ClassMethod Test() { d ..%KillExtent() f s="joefu","JoeFu" { s t=..%New() s t.s1=s s t.s2=s s t.s3=s d t.%Save() } zw ^dc.aD,^dc.aI } }select FIELD_NAME,DATATYPE,COLLATION_FUNCTION,MAXLEN from %Library.SQLCatalog_SQLFields('dc.a') FIELD_NAME DATATYPE COLLATION_FUNCTION MAXLEN ID %Library.BigInt (null) (null) s1 %Library.String SQLUPPER 50 s2 %Library.Username SQLUPPER 160 s3 dc.Username SQLUPPER 160 x__classname %Library.RawString (null) (null) select INDEX_NAME,FIELDS from %Library.SQLCatalog_SQLIndices('dc.a') INDEX_NAME FIELDS is1 $$SQLUPPER({dc.a.s1}) is2 $$SQLUPPER({dc.a.s2}) is3 $$SQLUPPER({dc.a.s3}) USER>d ##class(dc.a).Test() ^dc.aD=2 ^dc.aD(1)=$lb("","joefu","joefu","joefu") ^dc.aD(2)=$lb("","JoeFu","JoeFu","JoeFu") ^dc.aI("is1"," JOEFU",1)="" ^dc.aI("is1"," JOEFU",2)="" ^dc.aI("is2"," JOEFU",1)="" ^dc.aI("is2"," JOEFU",2)="" ^dc.aI("is3"," JOEFU",1)="" ^dc.aI("is3"," JOEFU",2)=""
go to post Vitaliy Serdtsev · Feb 28 See Class Reference: Class %Stream.FileBinaryGzip Extends FileBinary Class %Stream.FileBinary Extends %Stream.Object Hence %Stream.FileBinaryGzip is already the heir of %Stream.Object.
go to post Vitaliy Serdtsev · Feb 14 It seems to me that there is a typo in the TestStartBottomLeft method: should be Do $$$AssertEquals(##class(codeGolf.ClockwiseWord).Solution(.matrix, 3, 1), "781234569")
go to post Vitaliy Serdtsev · Feb 5 I'm not familiar with Ensemble, but it may be possible to replace the regular stream with the %Stream.GlobalCharacterSearchable class?
go to post Vitaliy Serdtsev · Feb 4 C:\Program Files\Python313\python3.dll Here is exactly the version 3.9.13, and not 3.13?
go to post Vitaliy Serdtsev · Feb 4 I was interested and I decided to check: USER>w $zv IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST USER>d $System.Python.Shell() Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32 Type quit() or Ctrl-D to exit this shell. >>>
go to post Vitaliy Serdtsev · Feb 4 Only InterSystems developers can fix the generated code. To do this, contact the WRC. You and I can only work around the bug by rewriting the query.
go to post Vitaliy Serdtsev · Feb 4 I installed Python 3.12.8 (x64) and configured it according to the documentation (link is given above) Everything is working fine: USER>do $System.Python.Shell() Python 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)] on win32 Type quit() or Ctrl-D to exit this shell. >>>By the way, I didn't touch PythonPath.
go to post Vitaliy Serdtsev · Feb 4 Please note the following warning: Important: There are known incompatibilities between InterSystems IRIS and Python 3.13, so you are advised to avoid Python 3.13 at this time. This issue will be addressed in an upcoming version of InterSystems IRIS.
go to post Vitaliy Serdtsev · Jan 28 That's right, the generated code lacks $GET or initial initialization of the variable.
go to post Vitaliy Serdtsev · Jan 28 Yes, these are fields that will either be inserted or updated. PS: In fact, the following query should work correctly: INSERT OR UPDATE myTable SET name='Omer', counter = NVL(counter,0) + 1 But unfortunately, the SQL engine generates code where an undefined variable is accessed, so the <UNDEFINED> error occurs. Try contacting WRC for a fix.
go to post Vitaliy Serdtsev · Jan 27 The query can be yet simplified: insert or update myTable(name,counter) select 'Omer', nvl((select counter from dc.myTable where name='Omer') + 1, 1)