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?

Or can anyone provide some guidance

Any help would be greatly appreciated.

0 2
0 655

Hello community!

I'm facing a base growth issue, which is being generated by a process and an Ensemble feature.

When executing the process of cleaning up the message queues, the Ensemble “preserves” the Streams that were part of these messages, deleting only the Header and Body. In this way the database (of one of the namespaces) has grown around 60GB per day, which has been maxing out the disk capacity.

InterSystems informed that this is a characteristic and that it is explained in the documents mentioned below.

1 2
0 645

Let's say I have a global named ^a and I need to export its nodes 1, 2, 3, 5 only.

Currently I write something like this:

Write $SYSTEM.OBJ.Export("a(1).gbl,a(2).gbl,a(3).gbl,a(5).gbl", "C:\Users\eduard\Desktop\a.xml")

Is there a way to write it shorter? I want to write global node once and list all the subscripts I need.

1 1
0 637

Hi all,

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?

Here is my global structure:

2 20
0 595

Hi,

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 ?

0 5
0 559

Hi,

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.

The format of the global is something like:

0 6
0 557

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)

0 3
0 546

Hi there have been various posts around how to clean up globals without parent data but none have gone into how you solve these issues.

Our database is approaching 600gb in size so i am looking into how to reduce this.

We use standard purge tasks.

Our cache stream class has a global size of 2463243 from running global size so it is what i would like to tackle first.

1) is there any way i can find based on my oldest message session for where most of these globals

0 3
0 529
Question
· May 27, 2017
Insert SQL

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.

0 2
0 513
Question
· Feb 20, 2022
Maximum Global Size ?

Dear people,

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. surprise

1 11
0 511

Hello. When you export and then import a table of data, is the import smart enough to figure out if a row already exists in the new namespace, and if so update the row rather than just save/add the row?

For example, we have a table in DEV, and the same table in QA. The DEV table has more fields than QA. When we moved up the class, the field definitions went with the table into QA, so now the table definition is the same in both.

0 2
0 484

If I were trying to access an index of a global variable, what time complexity would this operation have? My understanding of languages like Java/C++ is that arrays are stored as blocks of memory so that x[15] would have a lookup time complexity of O(1) because it just goes to (address of the array + 15) and retrieves the value stored there.

How does this work in Cache where the index of a variable isn't necessarily an integer value? If I were to have a variable like the following:

x("Adam") = "Red"

x("George") = "Blue"

x("Bryan") = "Green"

etc...

3 5
0 480

Is the default language (i.e., $$$DefaultLanguage, which is used as the basis for localization with $$$Text/etc. at compile time) always "en" for new Caché installations, or could it be different? How is this determined? I don't see an option to select a language during Caché installation.

Also, is there a supported/preferred API for setting the default language? Looking at %occMessages.inc, one option would be:

0 3
0 469

Currently, namespace Alpha is configured to use database AlphaDB as its global database. How would we go about having namespace Alpha configured to use database AlphaDB for its global database except where global ^Customers(CustomerId) has a CustomerId greater than 10M, which we would like to have it redirected to database BetaDB.

In other words, ^|"AlphaDB"|Customers contains all customers between 1 and 10,000,000; and ^|"BetaDB"|Customers contains all customers greater than 10,000,000. Any help would be appreciated.

0 4
0 467
Question
· Aug 3, 2020
Variables in Global Name

I have a number of globals I want to loop through depending on a passed in string...

^A("SYSTEM")

^B("SYSTEM")

^C("SYSTEM")

^D("SYSTEM")

^E("SYSTEM")

I am passing in a string of "A:C:D"

Piecing that to pull out A,C,D, then want to use that to pull out A,C,D from above, but having problems setting the name of the global to be the name of the variable I have pulled out of the string

How do I set this?

I have tried ^varname("SYSTEM")

0 3
0 427
Question
· May 25, 2022
Data import/export

I am creating "models" that contain rows in several class tables called Model, Path, Node.

So, model 19 includes 1 row in the Model table, 11 rows in the Path table, and 10 rows in the Node table.

I'd like to write some utilities to "move" model 19 from one instance to another.

0 4
0 422

Hi,

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

3 19
1 415