go to post Robert Cemper · May 24, 2019 You can get the pid without iteration.set nsp=$znspaceset pid=^$|nsp|lock("^DBLock(""Patient"",1119102928)","OWNER")do $system.Process.Terminate(pid)|nsp| is only required for access to a lock in a different namespace.
go to post Robert Cemper · May 22, 2019 as you describe if you refer to a file outside Caché and Caché has no control over itit's a clear case of data inconsistency you have 4 options:1a) create a fake file at that reference an delete it then 1b) add an "on before delete" trigger to check and fix in advance either in the record or in file system 2a) manipulate the file reference using the object behind your entry 2b) do the delete at object level, trap the error and ignore it. since the file is gone anyway
go to post Robert Cemper · May 17, 2019 when you generate Classes from XSD you require a reference. That' s where xsd is stored. It may make sense to ich copy it first to your default repository and generate your classes after.
go to post Robert Cemper · May 14, 2019 In fact, I see not 1 but 2 tables that share the same global.so it might be easier to have 2 separated definitions one with and the other without the 4th subscript (some $h)for access with SQL you than can use a UNION to assemble them. like:SELECT * FROM ( SELECT Account, PGC, Entity, ' ' as DateTime, ..fields... FROM TAB1 WHERE <some condition > UNION ALL SELECT Account, PGC, Entity, DateTime, ..same as above... FROM TAB2 WHERE <same condition >) order by 1,2,3,4or you decide to add the missing subscript in your global to have a common structure
go to post Robert Cemper · May 10, 2019 Thank you Dan!So after years, I realized what the proper use of [ Identity ] is.It's well documented . Anyhow it passed my attention. Thanks for the clarification.
go to post Robert Cemper · May 8, 2019 If this is Caché standard ID it is projected to SQL as xDBC Type INTEGERCaché SQL Reference - Data Types says:INTEGER%Library.Integer (MAXVAL=2147483647, MINVAL=-2147483648)so 5983658923646 is definitely out of rangexDBC Type :BIGINT%Library.BigInt represents a 64 bit integer value.I'm not aware of any parameter to change the data type of the generated ID.But this hack may do the trick. Just add this calculated Property to your class without affecting the storage. Property myID As %BigInt [ Calculated, SqlComputeCode = { set {*}=%ID}, SqlComputed ];
go to post Robert Cemper · May 6, 2019 As long as you don't go for Sharding this might work quite well.For Sharding the whole storage environment will make a significant difference also in class definitions.
go to post Robert Cemper · May 6, 2019 I tried it now in Caché 2016.2.2 manually overwriting Storage <Type>%Storage.Persistent</Type>.During compilation it gets automatically set back to <Type>%Library.CacheStorage</Type>Also in class defintion.Does this automatic change go back to repository ???
go to post Robert Cemper · May 6, 2019 At first sight in Documatic, it looks like %Library.CacheStorage was just renamed to %Storage.PersistentAs a workaround, I would simply try in Caché to make a copy of %Library.CacheStorage to a new %Storage.Persistent(a pure rename) Then compile a class with one and the other and compare the generated .int code.It's a dirty hack. But I have no hope ISC will ever provide some backward port from IRIS to Caché.Sorry I have no IRIS at hands and can't try it myself.
go to post Robert Cemper · May 5, 2019 score-1 #1 - disagree, see no valid reasoning-2 #2 - strongly disagree-1 #3 - disagree because of #2+1 #4- agree+1 #5 - agree+1 #6 - agree . pls.send enhancement req. to engineering+0 #7 - not clear about the message ? an oref is neither primitive nor dynamic+0 #8 - miss imagination of inconsistent return types+0 #9 - don't understand that message
go to post Robert Cemper · May 2, 2019 You may try WebTerminal over HTTPS as an alternate way for access.
go to post Robert Cemper · May 2, 2019 It's really a matter of taste.If you don't like the long list of params (especially with lousy documented methods) you can#1) use 1 single param and pass a local array byRef . and decode it yourself eg:par("IPadrr")="127.0.0.1")par("Port")=1972par(Namespace")="SAMPLES".....do ##class(my.par).method(.par)or#2) use the traditional style you may know from Caché I/O Device Guide having also just 1 parameterdo ##class(my.pieces).method("/SERVER=127.0.0.1:/PORT=1972:/NAMESPACE=SAMPLES")I personally prefer #2) as it gives you an embedded doc on your intentions.
go to post Robert Cemper · Apr 29, 2019 #1) all documentation on XML is hereIt covers everything to output Objects to XML.#2) to fill this in-between object you may use the SQL Table represented by an object class. as simple INSERT INTO my.xmltable select .........You just have to take care that the object class also extends %XML.Adapter .That makes it ready for XML Export. All details described in docs
go to post Robert Cemper · Apr 26, 2019 Dear Martin,I have a rather clear vision where your $example comes from ($zzg, $zza, ...) My personal suggestion is to move everything you maintain today in %ZZLANG?00 routines into clean Macro definitions (.inc)The history of %LANG* code goes back to times when migration from other language dialects (MSM, DTM, DSM, VISOS, ..) happenedand developers were writing just in .INT routines. That's far back in the late 80ies. The availability of MACRO code (also ages back) made it almost obsolete. The feature was never eliminated by considerations of backward compatibility. I personally would never allow any developer to touch %SYS. And wouldn't accept any code using $zz* , zz* stuff or $zu().There are much cleaner ways to achieve the same result without compromising the core.
go to post Robert Cemper · Apr 25, 2019 You may take my previous article The 'unlimited' UNIQUE index as a suggestion how to work around this limit.
go to post Robert Cemper · Apr 23, 2019 if you just look for a specific property instead of a larger part of the objectyou may use set value=##class(ICT.Experiments.B).<propertyname>GetStored(primaryKey)instead of set collB=##class(ICT.Experiments.B).%OpenId(primaryKey)to avoid loading the full object
go to post Robert Cemper · Apr 19, 2019 I may misunderstand your intentions butwhen I use "ResultSet.%Get("Collection")", all I get is a list of the primary keys of the objects. now you all you miss for each PrimaryKey is Set collB=##class(ICT.Experiments.B).%OpenId(primaryKey) orSet collC=##class(ICT.Experiments.C).%OpenId(primaryKey)and the object is yours.With your class definition, PrimaryKey is the Idkey of the Object.
go to post Robert Cemper · Apr 15, 2019 the total size is somewhat strange its format changes from 255 to 256 in size and interpretationand again at 65535 / 65536 up to <MAXSTRING>
go to post Robert Cemper · Apr 15, 2019 special case:s a=$lb() zzdump a w !,$l(a) 0000: 01 .1s a=$lb("") zzdump a w !,$l(a) 0000: 02 01 ..2s a="" zzdump a w !,$l(a)0