Article Mihoko Iijima · Oct 3, 2024 3m read

InterSystems FAQ rubric

You can check the free disk space at any time using the system utility class: SYS.Database and query: FreeSpace.

Here's how to try it in the IRIS terminal (go to the %SYS namespace and then run it):

zn"%SYS"set stmt=##class(%SQL.Statement).%New()
set st=stmt.%PrepareClassQuery("SYS.Database","FreeSpace")
set rset=stmt.%Execute()
do rset.%Display()

The output result example is as follows:

*In the command execution example, all databases are located on the same disk, so the free disk space (DiskFreeSpace) returns the same value.

0
0 0
Article Mihoko Iijima · Feb 23, 2024 5m read

I have challenged to create a bot application using Azure Bot that can retrieve and post data to IRIS for Health.

 

A patient's data has already been registered in the FHIR repository of IRIS for Health.

The patient's MRN is 1001. His name is Taro Yamada. (in Japanese :山田 太郎)

This bot can post new pulse oximeter readings as an observation resource linked to the patient.

1
0 443
Article Mihoko Iijima · Feb 22, 2024 2m read

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

3) Add or Remove Programs in the Control Panel (for Windows 10, select Apps from Windows Settings)

0
0 385
Article Mihoko Iijima · Jan 25, 2024 4m read

InterSystems FAQ rubric

If the system does not stop for 24 hours, old journal files will be deleted at 0:30 according to the "Journal file deletion settings".

A possible cause of journal files remaining that are older than the "Journal file deletion settings" is that there are transactions that remain open.

In that case, you will be able to delete the journal file by searching for processes executing transactions and finalizing the transactions.

The sample below checks for the existence of open transactions, and if they exist, outputs the target file name and journal record information.

3
2 323
Article Mihoko Iijima · Dec 28, 2023 1m read

InterSystems FAQ rubric

There is no need to recompile the routines after the version upgrade, but since the version update overwrites %SYS, user-created INT and OBJ format routines (*.INT,*.OBJ) in %SYS will be deleted. Therefore, you need to be careful. 

MAC, INT and OBJ routines with the following names are not deleted.

%Z*.INT, %z*.INT, Z*.INT,z*.INT
%Z*.OBJ, %z*.OBJ, Z*.OBJ,z*.OBJ

Please note that classes/CSPs need to be compiled after upgrading.

However, if you are upgrading to a maintenance release, no compilation is required. For details, please refer to the document below.

0
1 224
Article Mihoko Iijima · Dec 21, 2023 1m read

InterSystems FAQ rubric

If multiple InterSystems products are installed on the same system, the latest version of the InterSystems ODBC driver among the installed products will remain registered in the driver manager.

You can change to any driver by changing the registry entry below.

 Please note that running RegFiles.bat does not change the ODBC driver.

The registry entry is as follows.

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\InterSystems ODBC35 key Driver
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\InterSystems ODBC35 key Setup
0
0 346
Article Mihoko Iijima · Nov 30, 2023 3m read

InterSystems FAQ rubric

Class definitions created by users are stored in class definition classes. They can be used to obtain a list of class definitions from a program.

Note: Class definition classes refer to all classes contained in the %Dictionary package.

In the sample code below, a list of class definitions is obtained using the query Summary of the class %Dictionary.ClassDefinitionQuery.

2
0 526
Article Mihoko Iijima · Nov 9, 2023 1m read

InterSystems FAQ rubric

To create a user-defined error you need to prepare the XML that describes the error code and corresponding message that you want to use as a user-defined error.

Please set the error code as a negative integer.

<?xml version="1.0" encoding="UTF-8"?> 
<MsgFileLanguage="en"><MsgDomainDomain="UserErrors"><MessageId="-111"Name="MyError">An error has occured</Message> 
    <MessageId="-222"Name="MyError2">An error has occured 2</Message> 
  </MsgDomain></MsgFile>

Once the XML file is created, load it into the namespace you want to use.

2
2 641
Article Mihoko Iijima · Nov 2, 2023 3m read

InterSystems FAQ rubric

For routines (*.mac)

You can hide the source by exporting/importing only the *.obj that is generated after compiling the source program.

The command execution example specifies EX1Sample.obj and EX2Sample.obj, which are generated by compiling EX1Sample.mac and EX2Sample.mac, as export targets and exports them to the second argument file.

After moving to another namespace, I am using the exported XML file to perform the import.

1
0 597
Article Mihoko Iijima · Oct 12, 2023 1m read

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.

Class TEST.ARGTEST1 Extends%RegisteredObject
{
ClassMethod NewMethod1(Arg... As %StringAs %Boolean
{
 kill ^a
 merge ^a = Arg
}
}

The result of running it in the terminal is as follows.

1
0 435
Article Mihoko Iijima · Oct 5, 2023 1m read

InterSystems FAQ rubric

On Linux, use the iris command to execute a routine or method from a shell and get the return value.

For more information,  please refer to the document "About Instance Connections".

An example of a command is as follows.

iris terminal instname [arguments]

The return value of a shell script can be specified using a special variable using the Terminate() method of the %SYSTEM.Process class when the process ends, rather than by specifying an argument in the QUIT or RETURN command that is specified when a routine or method ends. Use the method of returning a value to $?.

2
1 490
Article Mihoko Iijima · Sep 21, 2023 1m read

InterSystems FAQ rubric

The meaning of each timeout value is as follows.

1. [Server response timeout]

If IRIS/Caché processing (routine or query execution) does not finish within this set time, the browser will return an error.

For example, if this value is 60 seconds and it takes 90 seconds to execute a routine/method/query, an error will occur.

2. [Queued request timeout]

For each IRIS/Caché server configured in CSP/REST, you can limit the number of processes that can run CSP/REST concurrently.

2
0 505
Announcement Mihoko Iijima · Sep 20, 2023

Hello developers!

We are holding the first technical article contest on Japan's InterSystems Developer Community!

The first contest is a technical document writing contest, and you can submit any content related to the InterSystems IRIS/InterSystems IRIS for Health. (The article must be in Japanese.)

✍ InterSystems Japan Technical Document Writing Contest: Articles related to IRIS ✍

🎁 Participation prize: There will be a participation prize for everyone who submits an article for the contest.

🏆Special prize: Authors of three selected works will receive special prizes.

0
0 522
Article Mihoko Iijima · Sep 14, 2023 1m read

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.

The SQL to get the ID, field name (COLUMN_NAME), data type (DATA_TYPE), description (DESCRIPTION) for the specified table (Sample.Human) is as follows.

0
1 554
Article Mihoko Iijima · Sep 7, 2023 1m read

InterSystems FAQ rubric

You can avoid the error by specifying a stream object as the argument of %ToJSON() used when generating a JSON string from a dynamic object.

A code example is below.

USER>set temp=##class(%Stream.TmpCharacter).%New()

USER>set jsonobj={}

USER>set jsonobj.pro1=["a","b","c","d"]

USER>set jsonobj.pro2=["あ","い","う","え"]

USER>do jsonobj.%ToJSON(temp)

USER>write temp.Size
51
USER>write temp.Read()
{"pro1":["a","b","c","d"],"pro2":["あ","い","う","え"]}

See also the documentation for details.

[IRIS] Serializing large dynamic entities to streams

1
0 530
Article Mihoko Iijima · Aug 31, 2023 1m read

InterSystems FAQ rubric

By specifying the start and end values ​​of the IDs for which you want to rebuild indexes in the arguments of the %BuildIndices() method provided in the persistent class (=table) definition, you can rebuild only the indexes within that range.

For example, to rebuild the NameIDX index and ZipCode index in the Sample.Person class only for ID=10 to 20, execute the following code (the ID range is specified in the 5th and 6th arguments). 

 set status = ##class(Sample.Person).%BuildIndices($LB("NameIDX","ZipCode"),1,,1,10,20
0
0 505
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
Article Mihoko Iijima · Jul 13, 2023 2m read

InterSystems FAQ rubric

It can be obtained by using the Size query of the system-provided %SYS.GlobalQuery class.

See the sample code below for usage examples.
*Please check the class reference for specifying columns and parameters.

 set dir="C:\intersystems\iris\mgr\user" // IRIS.DAT(or CACHE.DAT) folder
 set rs = ##class(%ResultSet).%New("%SYS.GlobalQuery:Size")
 do rs.Execute(dir) // You can also specify a mask with the 3d parameter
 while (rs.Next()) { 
   set gname= rs.Get("Name") // global name
   set gsize= rs.Get("Used MB") // global size (MB)
   write gname," : ",gsize,!
 }
0
2 555
Article Mihoko Iijima · Jun 29, 2023 3m read

InterSystems FAQ rubric

For volatile tables (tables with many INSERTs and DELETEs), storage for bitmap indexes can become inefficient over time.

For example, suppose that there are thousands of data with the following definition, and the operation of bulk deletion with TRUNCATE TABLE after being retained for a certain period of time is repeatedly performed.

0
0 309
Article Mihoko Iijima · Jun 8, 2023 1m read

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.

DECLARE CURSOR C1 IS
SELECT Name FROM Person WHERE Name LIKE 'A%' FOR UPDATE
OPEN C1
LOOP FETCH C1 INTO name 
... show name
... EXIT the LOOP when finished
END LOOP
CLOSE C1
0
0 341
Article Mihoko Iijima · May 11, 2023 2m read

InterSystems FAQ rubric

You can use the system routine ^DBSIZE to estimate the backup file size (see also Note 1).

^DBSIZE estimates the file size of full, cumulative, and differential backups of the databases selected in the database backup list.

The database backup list is created from [System Administration] > [Configuration] > [Database Backup] > [Database Backup List] in the Management Portal.

For more information, please refer to the document below.

Estimate backup size with ^DBSIZE [IRIS]

Estimate backup size with ^DBSIZE

An execution example is as follows.

0
0 321
Article Mihoko Iijima · Apr 13, 2023 6m read

InterSystems FAQ rubric

In this article, we will introduce how to deal with the situation: "I accidentally deleted a global!"

Backup files and journals are used to recover specific globals that have been accidentally deleted. Restoration is performed by specifying conditions and restoring journal records using the ^ZJRNFILT utility. In this way, you can apply a point-in-time backup of the database up to and including deleting a specific global for journal records that contain deletions. For more information on the ^ZJRNFILT utility, please refer to the document below:

2
1 629
Article Mihoko Iijima · Mar 5, 2021 3m read

This article is a continuation of this post.

The purpose of this article is to explain how the Interoperability menu works for system integration.

The left side of the figure is the window for accepting information sent from external systems.

There are various ways to receive information, such as monitoring the specified directory at regular intervals to read files, periodically querying the database, waiting for input, or directly calling and having it passed from applications in other systems.

1
0 1160
Article Mihoko Iijima · Mar 5, 2021 6m read

This article is a continuation of this post.

In the previous article, how the Interoperability menu works for system integration was explained.

In this article, I would like to explain how to develop a system integration using the Interoperability menu.

To begin with, what kind of process do you want to create? While thinking about this, make the following content.

  • Production
  • Message
  • Components
    • Business Services
    • Business Processes
    • Business Operations
0
0 737
Article Mihoko Iijima · Mar 5, 2021 4m read

This article is a follow-up to this post.

In the previous article, [What is a Production?], we checked the production contents. We ran the sample code and checked the flowing messages' contents into the production on the Visual Trace page.

This article will review the concept and the definition of the messages used to send and receive data between components from the required development content for system integration.

Before creating a message, let's review the case study.

0
0 628
Article Mihoko Iijima · Mar 5, 2021 10m read

This article is a continuation of this post.

In the previous article, we reviewed how to create and define messages used to send and receive data between components.

In this article, I will explain how to create a business operation from the component creation methods.

We will quickly check the code by referring to the sample.。

0
0 1025