If you want to run an OS executable file, command, or a program created within an InterSystems product when the InterSystems product starts, write the processing in the SYSTEM^%ZSTART routine. (The %ZSTART routine is created in the %SYS namespace).
Before you write any code in SYSTEM^%ZSTART, make sure that it works properly under all conditions.
The TIMESTAMP type corresponds to the %Library.TimeStamp data type (=%TimeStamp) in InterSystems products, and the format is YYYY-MM-DD HH:MM:SS.nnnnnnnnn.
If you want to change the precision after the decimal point, set it using the following method.
In our previous article, we explored how to send emails through Microsoft 365 using the Graph API. Since then, an anonymous client reached out to me about setting up some other methods of notifications through that API.
I came up with a challenge for myself to come up with a way to make a variable watch itself for a certain value and do something when it hits that value without having to check it every time something touches it. Basically, a way to say "if at any point during the execution of this code, if x = 0 (or whatever the condition is) do this thing." The class I ended up with watches a %Status:
When you run a routine in the terminal and an error occurs in the program, if you have not set the error trap properly, the program will enter debug mode as shown below.
Just want to share an old but always relevant best practice on namespaces changing @Dmitry Maslennikov shared with me (again).
Consider method:
classmethod DoSomethingInSYS() as %Status
{
set sc=$$$OK
set ns=$namespace
zn "%SYS"
// try-catch in case there will be an error
try {
// do something, e.g. config change
}
catch {}
zn ns ; returning back to the namespace we came in the routine
return sc
}
And with new $namespace the method could be rewritten as:
classmethod DoSomethingInSYS() as %Status
{
set sc=$$$OK
new $namespace
set $namespace="%SYS"
// do something
return sc
}
So! The difference is that we don't need to change the namespace manually as it will be back automatically once we return the method.
and we don't need try-catch (at least for this purpose) too.
InterSystems IRIS family has a nice utility ^SystemPerformance (as known as ^pButtons in Caché and Ensemble) which outputs the database performance information into a readable HTML file. When you run ^SystemPerformance on IRIS for Windows, a HTML file is created where both our own performance log mgstat and Windows performance log are included.
HealthShare uses a lot of XSLTs. These are used to convert IHE medical documents to SDA (internal HealthShare format) and back to IHE formats, to create summary reports, and to deal with IHE profiles (e.g., patient information query, document provide and register). Customers may customize the XSLTs to customize reports or for other reasons.
For debugging and development, it is very convenient to be able to run an XSLT from Terminal.
Record maps are used to efficiently map files containing delimited records or fixed-width records to message classes used by the interoperability function, and to map files from interoperability function message classes to text files.
Record map mapping definitions can be created using the Management Portal, and we also provide a CSV record wizard that allows you to define while reading a CSV file.
Visual Studio Code (VS Code) is a free source code editor made by Microsoft for Windows, Linux, and macOS. It provides built-in support for JavaScript, TypeScript, and Node.js. You can add extensions to provide support for numerous other languages including ObjectScript.
The InterSystems extensions enable you to use VS Code to connect to an InterSystems IRIS server and develop code in ObjectScript. The Visual Studio Code Documentation is an excellent resource on VS Code, so it is a good idea to be familiar with it.
You can use the %IndexBuilder class to perform index rebuilding using multiple processes.
Here is an example for the purpose of defining the standard index HomeStateIdx for the Home_State (state information of contact address) column of Sample.Person.
The steps are as follows:
1. Hide the index name to be added/rebuilt from the query optimizer.
Global mappings can be registered using the system class Config.MapGlobals.
The method to globally map ^Sample.PersonD in a database SAMPLES other than the default database from the namespace USER is as follows (example executed in a terminal).
I want to address the nasty problems about reading a flat text in ASCII, UTF* explicitly excluding HTML, EBCDIC, and other encoding. According to Wikipedia there are at least 8 variations of control characters.
CR+LF is typical for Windows
LF is typical for the Linux/UNIX world
CR is Mac's favorite
As you can deduct from the names the inspiration comes from mechanical typewriters.
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).
If you need to migrate your server for some reason, you can reduce the setup work by copying configuration information from the pre-migration environment to the post-migration environment.
The following setting information can be migrated.
Many organisations implement centralised log management systems to separate and centralise the log data in order to e.g. automate threat detection (and response) and to comply with regulatory requirements. The primary systems of interest are the various user facing applications, but increasingly also other kinds of systems including integration platforms.