Globals are multidimensional sparse arrays which are stored in InterSystems Data Platform. Everything in InterSystems Products is stored in Globals: Classes, Tables, Documents, Code.
I'm participating in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during the training. Tips presented in the day 4:
I want to generate a list object of routines from the ^$ROUTINE global without directly reading the [^$ROUTINE] global.
E.G. I want to create an array/variable/object with names of all routines that start with "ABC" so that an application process can use each routine name as input for a subsequent process.
I am trying to create a method to count the number of entries in a global, including all subscripts. I am having a bit of trouble getting the code to make it to the second subscript. When I get to the position where my key is "Canada" and I add a comma and empty quotes to it, it returns USA as the new key when I do the order function. Is the $Order or the global not able to use a single string to represent multiple subscripts?
We're developing Ensemble PoC and one day our frontend developer (who doesn't have Ensemble production running) said that Populate just doesn't cut it and he needs to see the real data. He needed only one object, but the problem was - it's a big object. Still, I checked ids of everything related and wrote this command (parts omitted, but you get the idea):
Those of you that worked already with ECP might know that it operates not only across operating systems, processor technologies (big-little-endian), but also -with limits- across versions in C/E. This cross-version feature also includes IRIS (verified for 2020.1) and C/E (2018.3)
I (really) spent hours on finding the maximum size a Global is allowed to be (for Windows, if that matters). All I seem to run into are database sizes (derived from a max number of blocks and block size), but I refuse to believe that is correct because too small to be realistic.
Have very little XML experience and have been able to manually create output. Have a need to take data that I store in a M global (example: ^TML("HDATA", ) and out put it in CCDA XML format.
Are there any examples of M code using the XMLWriter to accomplish this?
We are using CACHE 2017.2.1, I would like to retrieve data from Journal for killed global. Let say we have global name ^ EMP(123) with data and also have some child nodes and it has been killed by using cache kill command for some reason and we don't know who has executed this and when. My questions are below.
1) Can we get back the data of killed global from journal files,Is it possible or not ?
During my search for a snapshot of a persistent object, I met a feature that I would like to share as it could be useful in some special situations. My trigger was to have a before- and an after-image during unit testing.
Often we need to use relatively small arrays with constants, static arrays in algorithms, etc where we need to do something with each element of an array. There are several ways to deal with it in ObjectSctipt.
Previously I used to use globals, locals, PPG for this but not so long time ago figured out that %List is a way too handy.
Indeed, suppose we have an array of months and need to set up and use it in our code.
I wonder if you could help me with a problem with persistent globals and journals.
We have a few interfaces using a persistent global just to translate some codes. The use of that global is like a lookup table...an interface calls a method that search for a field (in the message) in the global. If found, the code is translated with another field from the global.
I have a classname and a property name. I want to know, when I get object value directly from a global, which property corresponds to which position in the $lb structure.
Sometimes global mapping of the same globals can be defined in different ways. E.g., I need to define it for 3 globals ^qAuditC, ^qAuditLog, ^qAuditLogC from the same database named APP-NOJOURN. Which approach should be better from the performance point of view?
1) qAudit* => APP-NOJOURN (one record in global mapping table) or
2) qAuditC => APP-NOJOURN qAuditLog => APP-NOJOURN qAuditLogC => APP-NOJOURN (three records in global mapping table)
I have created a package to export a Global into JSON object file and to re-create it by reloading from this file embeddedPython refers to the new available technologies. It should be understood as a learning exercise of how to handle the language interfaces. Only Global nodes containing data are presented in the generated JSON file. Differently from the previous example, this one is using embedded Python only, no ObjectScript. Therefore PURE
I am inserting rows in a table. This table is appearing in all namespace as I did global mapping.
So once I run insert command from a method, it insert the rows. When I run the same insert command from other namespace, it replace the existing data in table.
Insert command is same in all namespace but the data I m inserting is different.
We have a global with 65 million entries. All we are doing is just iterating through each entry to find out the total no of entries. It is currently taking 110 minutes. Is this something normal? What can we do to speed up this process? Below is the program for just iterating each entry in the global.
s sub=" ,count=0 f{ s sub=$o(^YYY(sub)) q:sub="" s count= count +1 } w!, "Total Count:"_ count