#Globals

0 Followers · 227 Posts

Globals are multidimensional sparse arrays which are stored in InterSystems Data Platform. Everything in InterSystems Products is stored in Globals: Classes, Tables, Documents, Code.

Documentation.

Question Scott Roth · Oct 2, 2024

I have been trying to track down an issue we are seeing in our TEST environment with Memory usage.

We have Several BP's for years now that take a HL7 message, parse it apart, and make calls to a Custom EnsLib.SQL.OutboundAdapter to have it execute Insert/Select/Update/Delete stored procedures against a MS SQL Database via JDBC connection. We are using Microsoft's JDBC 12.2 driver to do this.

What we are seeing is that IRIS.WorkQueue globals are being defined for these calls but then the IRIS.WorkQueue is not being cleaned up and taking up large amounts of Memory.

0
0 0
Article Megumi Kakechi · Aug 15, 2024 3m read

InterSystems FAQ rubric

Temporary globals stored in the IRISTEMP/CACHETEMP databases are used when a process does not need to store data indefinitely, but requires the powerful performance of globals. The IRISTEMP/CACHETEMP databases are not journaled, so using temporary globals does not create journal files.

The system uses the IRISTEMP/CACHETEMP databases for temporary storage and are available to users for the same.

For more information about temporary globals and the IRISTEMP database, see the following document:
Temporary Globals and the IRISTEMP Database

The globals used as temporary are:

0
0 0
Question David.Satorres6134 · Jun 24, 2024

Hi everyone,

We have successfully configured the Patient Index and are now looking to bring it to upper environments. Our plan is to export the Linkage Definition and import it into higher environments to avoid any manual work. However, I am having trouble finding an export option in the Linkage Definition Designer and locating the globals that hold this setup.

I would greatly appreciate any tips or guidance on how to export/import the Patient Index configuration between environments.

Thank you in advance!

0
0 0
Question Mark OReilly · Jun 12, 2024

Hi:

We are looking again into DB size. Looking at our Ens.MessageHeaderI GSIZE is 3767107

Looking at the global i'm not sure if we have had an issue in the past so much of the data looks the same, we only have 3 values in the  $zwc and although some of the data in the $c between 1 and 18630 it looks very similar as if there was an issue in the past. But if anyone has any examples of their index param this would help to know if our global is abnormal. 

Data below 

0
0 0
Question maxime keltsma · Apr 18, 2024

Hi everyone,
I have this global with 2 informations in it: Reference (ex: 1329) and Code (ex: JMMK-G1D6).

^DataTest    =     3
^DataTest(1)    =     $lb("","1329","JMMK-G1D6")
^DataTest(2)    =     $lb("","1516","AMEV-GVPF")
^DataTest(3)    =     $lb("","2333","4QC6-4HW3")

With ObjectScript, i want to test if Reference 1516 exists in the global. 
In the InterSystems portal, i can do it with SQL (SELECT count(*) FROM DataTest where Reference = '1516'), but can we do the same in ObjectScript without SQL and manipulating the global directly ?

Thanks for help.

0
0 220
Article Chad Severtson · Apr 12, 2023 8m read

Spoilers: Daily Integrity Checks are not only a best practice, but they also provide a snapshot of global sizes and density. 
Update 2024-04-16:
  As of IRIS 2024.1, Many of the below utilities now offer a mode to estimate the size with <2% error on average with orders of magnitude improvements in performance and IO requirements. I continue to urge regular Integrity Checks, however there are situations where more urgent answers are needed.

4
4 2094
Question Stefan Cronje · Apr 5, 2024

Hi all,

I have a situation where I am writing to global from different processes - let's call it an Event Queue.
There is then a different process that uses $order to read through the data - the PubSub processing BP.

Sometimes the writing of this global will form part of a transaction that also insert data into other tables, using tstart and tcommit.
If there is some issue, it will roll back, and the entry written to the global will also roll back.

0
0 169
Question Richard Rayburn · Mar 22, 2024

In cache studio there are features, dialog boxes, that help map data from a global to class properties.
I have used %CacheSQLStorage quit a bit, or have in the past, to map globals to classes.

I haven't been able to find a similar feature in VisualStudio.
Do I need to upgrade to IRIS to be able to use VisualStudio to map global properties to classes?

Thanks for your time,
Richard

0
0 152
Article Vadim Aniskin · Mar 13, 2024 4m read

JSON is a lightweight data interchange format for representing and exchanging data between a server and a web application. Its popularity has led to its widespread use in applications based on InterSystems technology, as well as demand for a converter that transforms globals to JSON and back. Therefore, @Evgeny Shvarov suggested developing Global->JSON->Global converter. Implementing such a converter is important to ensure interoperability, simplify data exchange, support web services, and provide a standardized approach to data representation across different software ecosystems. This

0
0 292
Question Ashok Kumar T · Jan 21, 2024

Hello Community,

The process private global doesn't impact the $storage. But, Why the value has decreases at first time of initialization. 

LEARNING>write $zversion
IRIS for Windows (x86-64) 2023.3 (Build 254) Wed Nov 8 2023 13:28:10 EST
LEARNING>write "$Storage: ",$storage
$Storage: 2199023141712
LEARNING>set ^||Test="Test"
 
LEARNING>write "$Storage: ",$storage
$Storage: 2199023136848
LEARNING>write 2199023141712-$storage
4864

Just want to ensure about it.

4
0 225
Question Anna Golitsyna · Jan 19, 2024

I am inspecting our DB globals in order to reduce sizes of the worst offenders if possible. When I come to a large global, I am interested which of its nodes are the largest. Hence code below with unexpected different results. Any explanations why are results different?

6
0 437
Article Brendan Bannon · Dec 27, 2016 8m read

The Art of Mapping Globals to Classes (4 of 3)

The forth in the trilogy, anyone a Hitchhikers Guide to the Galaxy fan?

If you are looking to breathe new life into an old MUMPS application follow these steps to map your globals to classes and expose all that beautiful data to Objects and SQL.

If the above does not sound familiar to you please start at the beginning with the following:

The Art of Mapping Globals to Classes (1 of 3)

The Art of Mapping Globals to Classes (2 of 3)

The Art of Mapping Globals to Classes (3 of 3)

7
0 2281
Question Yone Moreno · Dec 19, 2023

Good morning,

First of all thanks for your help and time.

We find ourselves at a crossroads in our development journey, and we're reaching out to the community for insights and guidance regarding a critical aspect of our data management strategy.

Our current challenge revolves around the persistence of data in Globals, specifically when it comes to purging. The issue at hand is that, despite purging, data stored in Globals under the current %Persistent classes remains intact. To address this, we are contemplating a shift from %Persistent to %SerialObject for each relevant class.

3
0 342
Question Mike Williamson · Nov 17, 2023

I'm working for an organisation that is running a very old version of InterSystems Cache (5.016) which runs on AIX . The last two times we have re-booted Cache, we have encountered rollbacks. I've been asked two questions. During the rollback it was "How long is it going to take?" and after the system returned, it was "So what caused it?". My answer to both was "I don't know".

4
0 422
Article Robert Cemper · Nov 19, 2023 2m read

There are situations when your only access to a server is using a web browser,
and there is just no chance of a Terminal or Console access.
The Online Demo Server is such a case.

So you have WebTerminal. That's fine for ObjectScript and Embedded Python.

But my demo is straight Java. And is interactive.
$ZF(-100...) is some aproach. But it's rater batch-oriented and not interactive.
@Enrico Parisi  presented a nice extension to WebTerminal recently.
It's close to my own packageWebCommand that I presented a year ago.

0
0 169
Question João Carlos Azevedo · Oct 23, 2023

I need to develop a tool to help to get what data is being consumed by a certain process, in order to get all data used to build an automated test scenario.

For example, some user process will pull data from ^GLOBAL(1)="dataString", ^GLOBAL(2)="dataString2", ^GLOBAL1(1)="data1String", ^GLOBAL2(4)="data2String4". Amidst all other data on these Globals, I will ignore everything that was not used in the user process, and get the specific keys used on it.

12
0 449
Question Ryan Pflughaupt · Sep 21, 2023

Currently I have a program that is going to be used to compare global nodes between namespaces. Using nested FOR statements I am stepping through global nodes and comparing between the namespaces, if the global values are different I then parse the node comparing each delimited segment.

This is working.

I want to now be able to set what global I am in as a variable to expand on this concept. 

Program architecture

3
0 365
Question Sylvain Guilbaud · Sep 8, 2023

Hello,

I have a global whose structure is multi-level and I am trying through a class and a SQL query to display a table which includes all the values ​​and levels.

^AFO("Site","Ville")="66722,3743"
^AFO("Site","Ville","111BB","OBT")=",MMM,XXX,"
^AFO("Site","Ville","111OW","OBT")=",XXX,MMM,"
^AFO("Site","Ville","AANVRBIBS","zzz")    =    "1^^1"
^AFO("Site","Ville","AANVRBIBS","zzz","*","dut")    =    "*afhalen waar gevonden"
^AFO("Site","Ville","AANVRBIBS","zzz","*","eng")    =    "*Pickup where found"
^AFO("Site","Ville","AANVRBIBS","zzz","*","fre")    =    "*Lieu où trouvé"

2
0 527
Article Alex Woodhead · Sep 5, 2023 8m read

Overview

The online documentation contains a reference Defining and Using Class Queries -

Customizing Stored Procedures with ObjectScript directly has been useful to access NoSQL storage and external messaging via integration, to present output in tabular format.

For example: An application that already uses 90% SQL interaction from a front end, can then also extend this access to the other 10% of required platform functionality, via the same SQL access.

The purpose of this article is to explore how to achieve the same effect via Embedded Python methods.

0
0 408
Article Robert Cemper · Aug 17, 2023 1m read

Inspired by a Question from @Evgeny Shvarov and a Reply from @Ashok Kumar T
I have created a base for Global download as XML file

How to use:
 
just call the page like http://<your_server>/csp/samples2/dc.Gdown.cls?GBL=global_name

gbl-name  without the initial ^ (caret)
The output has a default name <global_name>.XML  Your choice is available.

Known Limits:

  • you have to install it at your sourcing server
  • it is not tested/working across namespaces
  • there is no partial download
  • error handling is just basic or missing

There is space for personal improvements.
and this is it:

2
1 258
Question John Bradshaw · Jul 12, 2023

I found the thread that discusses object mapping, in particular mapping a common global among more than one namespace. The example that is given is a simple one when it's ^global(sub1, ^global(sub2, etc. However I'm having trouble getting this to compile/work when the global has a fixed subscript amongst variable ones.

I have this global in namespaces LAB and ARK in the following format:
^CB(1,sub1)=....

^CB(1,sub2)=...

^CB(1,sub3)=...

Here is what I have for this. In it's current state it throws tons of errors:

4
0 373
Article Robert Cemper · Aug 10, 2023 3m read

As noted in the previous article Native API has some limits.
So I did some research on a more Terminal-like interface that
provides me with access like a console or the IRIS terminal
to allow my  $QUERY over a global and other nice commands
that are not supported/mapped in NativeAPI for ObjectScript.

The basic tools are well-prepared and available.

  • Connection() creates a fully operational and stable partition for me
  • Function() allows calling any routine or method I need
  • similar ClassMethodValue and ClassMethodVoid

There is just no method CommandLine and some already prepared code is needed.

1
0 254
Article Robert Cemper · Aug 10, 2023 3m read

This question originally appeared in the comments of the post: Download globals from a particular server
 

This article was inspired by a recent question from @Evgeny Shvarov 
Download globals from a particular server
It is not a click-and-run code but a draft that requires adjustments for your special needs
you have  to add 

  • your credentials for server access
  • your level of error handling
  • Global name
  • the first set of subscripts as  %LB() block default=""
  • the last set of subscripts as  %LB() block default=""
  • a new global name if required default="" >> name not changed
1
0 275
Question Rathinakumar S · Jul 26, 2023

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
 

19
1 584
Article Mihoko Iijima · Jul 20, 2023 4m read

InterSystems FAQ rubric

You can search for a specific global variable in the journal file using the ByTimeReverseOrder query of the %SYS.Journal.File class and the List query of the %SYS.Journal.Record class.

The role of each query is as follows.

A) %SYS.Journal.File query of the ByTimeReverseOrder class

You can get the journal file name. Results are returned in descending order of journal file name. 

1
1 436