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

Article Andreas Schneider · Apr 22 4m read

When using standard SQL or the object layer in InterSystems IRIS, metadata consistency is usually maintained through built-in validation and type enforcement. However, legacy systems that bypass these layers—directly accessing globals—can introduce subtle and serious inconsistencies.

0
0 0
Article Tomoko Furuzono · Nov 6 2m read

InterSystems FAQ rubric

When exporting using the Export() method of the %Library.Global class, if the export format (fourth argument: OutputFormat) is set to 7, "Block format/Caché block format (%GOF)," mapped globals cannot be exported (only globals in the default global database of the namespace are exported). To export mapped globals in "Block format/Caché block format (%GOF)," specify the database directory to which you want to map them in the first parameter of %Library.Global.Export().

An example of execution is shown below. 

0
0 0
InterSystems Official Daniel Palevski · Oct 22

The 2025.1.2 and 2024.1.5 maintenance releases of InterSystems IRIS® data platform, InterSystems IRIS® for HealthTM, and HealthShare® Health Connect are now Generally Available (GA). These releases include the fixes for a number of recently issued alerts and advisories, including the following: 

0
0 0
Article Harshitha · Oct 22 2m read

Hello community,

I wanted to share my experience about working on Large Data projects. Over the years, I have had the opportunity to handle massive patient data, payor data and transactional logs while working in an hospital industry. I have had the chance to build huge reports which had to be written using advanced logics fetching data across multiple tables whose indexing was not helping me write efficient code.

Here is what I have learned about managing large data efficiently.

Choosing the right data access method.

0
0 0
Article Vachan C Rannore · Sep 15 2m read

Starting out with ObjectScript, it is really exciting, but it can also feel a little unusual if you're used to other languages. Many beginners trip over the same hurdles, so here are a few "gotchas" you'll want to watch out for. (Also few friendly tips to avoid them)

NAMING THINGS RANDOMLY

We have all been guilty of naming something Test1 or MyClass just to move on quickly. But once your project grows, these names become a nightmare. 

➡ Pick clear, consistent names from the start. Think of it as leaving breadcrumbs for your future self and your teammates.

MIXING UP GLOBALS AND VARIABLES

0
0 0
Question Mary George · Oct 8

Hi Team, 

Can I please check if anyone has built a simple web interface for maintaining custom SQL lookup class.   

We have a simple persistent class in HealthShare which is used for storing Pathology test codes. Test codes in this lookup class is used for message filtering and applying additional logic when processing pathology results/orders. 

We want to make this class available to external users from pathology (not the usual management portal users) to maintain so that they can add/edit/delete test codes as required. 

0
0 0
Article Beatrice Zorzoli · Sep 10 4m read

I joined InterSystems less than a year ago. Diving into ObjectScript and IRIS was exciting, but also full of small surprises that tripped me up at the beginning. In this article I collect the most common mistakes I, and many new colleagues, make, explain why they happen, and show concrete examples and practical fixes. My goal is to help other new developers save time and avoid the same bumps in the road.

1. Getting lost among system classes and where to start

0
0 0
Article Vachan C Rannore · Aug 18 3m read

While starting with Intersystems IRIS or Cache, developers often encounter three core concepts: Dynamic Objects, Globals & Relational Table. Each has its role in building scalable and maintainable solutions. In this article, we'll walk through practical code examples, highlight best practices, and show how these concepts tie together. 

1. Working with Dynamic Objects:

Dynamic objects (%DynamicObject and %DynamicArray) allow developers to manipulate JSON-like structures directly in Objectscript. They are especially useful for modern applications that need to parse, transform or generate JSON.

0
0 0
Question MARK PONGONIS · Aug 18

Trying to create a new SQL Storage map on existing cache Global in the following format - ^MYGLO("R",rec)=data where the 'data' is built using $zel. e.g. $zel(data,1)="p1", $zel(data,2)="p2" etc... and the ^MYGLO("R",123)=data.

I'm having 2 issues. First, using the SQL Storage map wizard, I cannot figure out how to convey data in $zel format in the "Delimiter" field. 

Second, since I couldn't figure that out,  I tried to use the "Use Retrieval Code" option and entered the following line for the P1 property:

but get an error when compiling saying I cannot reference another field:

0
0 0
Discussion Harshitha · May 30

Hey everyone,

I'm diving deeper into Caché ObjectScript and would love to open a discussion around the most useful tips, tricks, and best practices you’ve learned or discovered while working with it.

Whether you're an experienced developer or just getting started, ObjectScript has its own set of quirks and powerful features—some well-documented, others hidden gems. I’m looking to compile a helpful set of ideas from the community.

Some areas I’m especially interested in:

0
0 0
InterSystems Official Daniel Palevski · Jun 9

InterSystems has released new point updates to resolve a defect affecting the most recent prior versions of 2025.1.0, 2024.1.4, 2023.1.6, and 2022.1.7, for the following supported product lines:

  • InterSystems IRIS
  • InterSystems IRIS for Health
  • HealthShare Health Connect

This issue could result in unexpected <PROTECT> errors or access anomalies when using features such as:

  • Implied namespaces
  • Mixed read-only/read-write access to databases
  • Management Portal pages for listing routines and globals

Symptoms Included:

0
0 0
Question Evgeny Shvarov · Jun 5

Hi IRIS experts!

I have a parameter in a class that stores a global name:

Parameter GlobalName = "^AGlobal";

then I'm trying to call it as:

set gn=$name(..#GlobalName)

to use it later as:

set @gn@("index")="value"

But! I'm having syntax at set gn=$name(..#GlobalName)

What am I doing wrong?

0
0 0
Article Neil Shah · May 12 7m read

Introduction

Hello! In this article, I will be discussing database degrade, a type of data integrity issue one can face when using IRIS. First, I will be going over a review of the structure of IRIS databases. I'll then discuss how database degrade can manifest and common causes of degrade issues. I'll then conclude with general tips we give our customers about how to prevent or prepare for database degrade issues.

IRIS Database Structure

0
0 0
Question Ashok Kumar T · May 22

Hello Community,

When I run the following code with x undefined in terminal, it throws a syntax error and returns control to the program stack. After issuing a GO command, execution continues, and setting the global variable ^zz1.

code 1:

test.mac
if$Data(@x@(a,b,c)) {
    set^zz1=1212
}
write !,1212,!
////orif$Data(@x@(a,b,c)) set^zz1=1212write !,1212,!

 if I assign the result of $D(@x@(a,b,c)) to a local variable like d using set d=$D(@x@(a,b,c)), and then use if d { ... }, the code fails(global is not set) working as expected.

Code 2

0
0 0
Discussion Aleksandar Kovacevic · Apr 26, 2020
So far, I found there are some interesting ways to search in global structure:

through Query %Library.Global.Find
through Query %Library.Global.Get

%Library.Global.Find

ObjectScript

set statement=##class(%SQL.Statement).%New()
set status=statement.%PrepareClassQuery("%Library.Global","Find")
set resultset=statement.%Execute("USER","^Persons","Email") // <Namespace>,<Global>,<Keyword>
while resultset.%Next() {
write !, resultset.%Get("Name"),", "
write resultset.%Get("Value"),", "
write resultset.%Get("Name Format"),", "
write resultset.%Get("Value

5
1 1226
Question Bransen Smith · Oct 1, 2024

I have the class ConfigUtils.ConfigSettingsTable, which is a persistent object.  I know I need to map packages from the original namespace. In this case, I have mapped ConfigUtils.ConfigSettingsTable from the originating namespace (IRISTST database) across all other namespaces.

With this, I am able to see the table ConfigUtils.InstanceSettings in SQL Explorer in each namespace, but the same data is not shared across environments. For example, in the MAINTENANCE namespace, I can see the table, but I don't see the same information that I see in the table in the original IRISTST namespace.

0
0 0
Article Parani.K · Mar 2 8m read

Parallel query hinting boosts certain query performances on multi-processor systems via parallel processing. The SQL optimizer determines when this is beneficial. On single-processor systems, this hint has no effect.

Parallel processing can be managed by:

  1.  Setting the auto parallel option system-wide.
    
  2. Using the %PARALLEL keyword in the FROM clause of specific queries.
    

%PARALLEL is ignored when it applied to:

0
0 0
Announcement Anastasia Dyubaylo · Feb 25

Hi Community,

Watch this short exercise in writing basic code snippets in InterSystems ObjectScript using Copilot in VSCode and the GPT-4.0 engine. This screencast covers "Hello, World," global manipulation, class creation, and building a simple REST API application.

>> Coding InterSystems ObjectScript with Copilot <<

🗣 Presenter: @Evgeny Shvarov, Senior Manager of Developer and Startup Programs, InterSystems

📌 The related code can be found here: objectscript-copilot-demo.

0
0 0
Article Yuri Marx · Dec 16, 2024 2m read

The best way to list, edit, save and delete globals is using an IDE. Now, it is possible if you use VSCode. It is also possible to save globals using yaml files. Perform the following steps:

1. Get an InterSystems IRIS instance and install the application iris-global-yaml: 

zpm:USER>install iris-global-yaml

2. If you just to want an InterSystems IRIS trial for tests git clone and run on docker:

git clone https://github.com/yurimarx/iris-global-yaml.git
docker-compose up -d --build
0
0 0
Article Yuri Marx · Dec 19, 2024 14m read

VSCode is the most used IDE in the world. It is strategic have more extensions for VSCode for InterSystems technologies to keep increasing the developer community.

My new app IRIS VSCode Global Editor is an excellent sample to learn how to create extensions to IRIS. You can check it on https://openexchange.intersystems.com/package/IRIS-Global-VSCode-Editor.

To be ready to create extensions for VSCode

From https://code.visualstudio.com/api/get-started/your-first-extension you have all steps to get ready, but I will detail here to you.

0
0 0
Question Mary George · Nov 13, 2023

Hello, 

We noticed from the integrity logs that some of the namespaces in our integration engine are using large amount of space ( ~380GB ) for the global ^EnsHL7.Segment. 

We have culling implemented for large globals like MessageHeader and MessageBody.

Is it a standard process to implement culling for ^EnsHL7.Segment global and any idea about what will be the impact of adding culling to this global?

2
0 395