InterSystems FAQ rubric

ObjectScript allows you to pass any number of arguments using arrays. Do it by adding ... after the argument name.

An example is as follows. In the example statement, the argument information is set in a global variable (a variable stored in the database) so that it can be easily checked after the method is executed.

5 1
0 262

Below is a simple alert processor based on the EnsLib.HTTP.OutboundAdapter to send text alerts via an SMS Gateway service. Typically, all that is needed to send an HTTP Post to the gateway service is the destination phone number, a source phone number, credentials, and the URL.

The code below is based on the Anveo gateway whose interface is as follows:

5 5
1 1.8K

Requirement: Transform source XML message to target JSON.

step1: First create json equivalent xml from any online tool.

step2: use add in studio utility create persistent classes from json equivalent xml and compile it , now target persistent classes are ready

step3: Do the above step for source xml or xsd and generate persistent classes for source and compile it

step4: complete the DTL by selecting root node from source, target persistent classes and complete the mappings and compile it

5 0
0 358
Article
· Jul 6, 2023 1m read
How to overload methods in ObjectScript

InterSystems FAQ rubric

The InterSystems ObjectScript language does not allow you to define methods of the same name with different arguments. It is generally classified as a programming language called a dynamic language.

In ObjectScript, you can freely control which arguments are used when executing a method, so unlike languages ​​such as Java, which are not dynamic programming languages, there is no need to strictly distinguish methods by the number of arguments at the compilation stage.

5 0
1 199

Configuring an Ensemble production can be a challenging task involving a thorough understanding of the system and production functionality and a detailed understanding towards each configuration item. After successfully configured an Ensemble production, you might need to set up an identical production on the mirror environment, or deploy the production on a development system to a live system, or send a copy for diagnostic/debug purposes. Other times you might have spent some time designing a BPL/DTL and some other productions can use the same logic.

5 0
0 4.4K
Article
· Jun 9, 2016 1m read
Ensemble monitoring

First post! In order to somewhat redeem myself for an unnecessary call to support, I've decided to post some classes that I've written to monitor certain metrics inside our Ensemble Live instance (yeah, Kyle, you WERE laughing at me, but it's okay). What the classes do is to run queries and code to get database sizes, status of the mirror, counts of rows in tables such as EnsLib.HL7.Message and Ens.MessageHeader. The data is collected and written to tables and then an email is sent out daily upon completion. I've found this quite useful in keeping an eye on what's going on. It's help

5 5
1 892

InterSystems FAQ rubric

You can programmatically retrieve routine dates and sizes using the RoutineList query of the %Library.Routine (or just %Routine) class.

The RoutineList query has an argument, and the routine name to be searched can be specified by prefix match or middle match. (For wildcards, specify * or ?)

In the example below, *.MAC is specified as an argument.

5 2
0 393

InterSystems FAQ rubric

To resolve the error <PROTECT>, remove the read-only attribute of the system-wide library database (IRISLIB for InterSystems IRIS, CACHELIB for Caché/Ensemble/HealthShare (Caché-based))

Once you have finished importing the routine, remember to change it back to read-only.

[Version 2013.1 and above]
[Management Portal] > [System Administration] > [Configuration] > [System Configuration] > [Local Database] Uncheck "Mount read-only" from the database name link.

4 3
0 260

Hi ObjectScript developers!

How to Protect Your Belongings from Pests While Moving - Delicate ...

InterSystems ObjectScript is perhaps the best language on the planet to deal with globals - and it is an interpretable language.

Yes, it has a compiler. But even the compiler can compile some lines in ObjectScript which will then fire as bugs during the runtime.

There are some technics on how to avoid that such as unit testing, coding guidelines and your coding experience, of course ;)

Here I want to present to you the yet another approach to how you can reduce the number of errors in your ObjectScript runtime and enforce coding guidelines - it's an ObjectScript Quality tool developed by Lite Solutions, InterSystems solution partner.

See the details below.

4 0
0 411

Hey everyone!

I recently learnt something new while working with WRC on an issue, and I wanted to share with everyone on the off chance it could help someone else.

Scenario:

Files are being inexplicably written to a folder on your server and, due to the number of files in the folder and general system throughput, it is not possible to work through the files to track down the source.

4 0
0 307

About regulations

Personal data privacy regulations have become an indispensable requirement for projects dealing with personal data. The compliance with these laws is based on 4 principles:

4 0
2 329

InterSystems FAQ rubric

It can be retrieved using the schema INFORMATION_SCHEMA.

INFORMATION_SCHEMA is a system schema and is not displayed by default in the SQL menu of the Management Portal.

The method to display it is as follows.

  1. Open Management Portal → System Explorer → SQL menu.
  2. Check "System" on the left of the schema drop-down.
  3. Select INFORMATION_SCHEMA from the schema dropdown.

4 0
1 311

InterSystems FAQ rubric

This error occurs when an instance of the class is already open at compile time.

There are two ways to deal with this issue:

  1. Terminate the process or application that has the instance open
  2. Compile options in the studio build menu: Check the compile flag “Compile classes in use” and compile.

If you want to determine which process is using the class, try the sample routine below.

4 1
0 125

InterSystems FAQ rubric

Using the Config.Configuration class and SYS.Database class methods, you can create and register a namespace database from the terminal.

Below is a series of execution examples that create database file /CacheDB/AAA/cache.dat and register database AAA and namespace AAA in the configuration file (cache.cpf).
* Execute in the %SYS namespace. *

* Make sure that this script runs as the user that is used for all IRIS processes to ensure that the directory has appropriate ownership and permissions *

4 3
0 269

At least three different ways to process errors (status codes, exceptions, SQLCODE etc is given in ObjectScript. Most systems have status, but for a range of reasons exceptions are more convenient to manage. You spend some time translating between the various techniques dealing with legacy code. For reference, I use several of these excerpts. It is hoped that they will also support others.

4 2
2 1.5K
Article
· Apr 24, 2017 1m read
Diagnosing the cause of <PROTECT> errors

If your application is raising <PROTECT> errors and you're finding it hard to work out why, here's a way to get additional information.

First, if auditing is not already enabled, turn it on:

Then use "Configure System Events" (highlighted above) and locate the event named %System/%Security/Protect. In the screenshot below I used the Filter field to do this (type "protect" - highlighted below - and press TAB):

4 1
0 2.3K
Article
· Jun 8, 2023 1m read
How to write SELECT ... FOR UPDATE

InterSystems FAQ rubric

Since SELECT ... FOR UPDATE is implemented in many RDBMS as a method of explicit row lock acquisition, I think there are many cases where this function is used.

This syntax is not an error for InterSystems products, but it does not acquire row locks as expected.

This article will show you how to achieve equivalent functionality.

4 0
0 237

InterSystems FAQ rubric

To remove InterSystems products installed on your Windows system, use Add or Remove Programs in Control Panel (in Windows 10, select Apps from Windows Settings).

Since we will be making changes to the system, you will need to log in as a user with administrator privileges.

1) Log in to the system as an administrator.

2) From the system tray, exit the launcher of the InterSystems product instance you want to uninstall (click launcher → exit).

4 0
0 151