Article
· May 25, 2023 2m read
API to import/export routines

This is an article on the InterSystems FAQ site.

1. Export API

a. Use $system.OBJ.Export() to specify individual routines to export. For example:

do $system.OBJ.Export("TEST1.mac,TEST2.mac","c:\temp\routines.xml",,.errors)

The format to specify is routine name.extension, and the extension is mac, bas, int, inc, obj.

Errors during export are stored in errors.

7 2
2 359
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

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

We are looking at what we need to do to migrate from our current usage of Zen reports to InterSystems Reports. One of the hurdles for us is figuring out ways to interact with InterSystems reports programmatically from ObjectScript routines. There is a Java API for it, but it is possible to generate a report from InterSystems reports to a stream object in ObjectScript without diving into Java by using a %Net.HttpRequest. Here is a code example, followed by an explanation:

1 0
0 125

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.

2 0
0 131

Several steps should be done in order to secure the connection through xDBC clients to an IRIS Server instance using TLS. Most of the information can be obtained from the documentation about TLS on IRIS here, about configuring the security layer for encrypted connections. In the next paragraphs we will cover an step-by-step guide on how to configure and test the connection using SQL Clients apps using ODBC and JDBC.

2 0
1 391
Article
· Apr 17, 2017 4m read
Debugging Web

In this article I'll cover testing and debugging Caché web applications (mainly REST) with external tools. Second part covers Caché tools.

You wrote server-side code and want to test it from a client or already have a web application and it doesn't work. Here comes debugging. In this article I'll go from the easiest to use tools (browser) to the most comprehensive (packet analyzer), but first let's talk a little about most common errors and how they can be resolved.

16 2
5 3.2K

InterSystems FAQ rubric

Migrating data to another system takes two steps.

1. Migrating class definitions

To migrate the class definition to another system, export it to a file in XML format or UDL format (extension .cls).

The export procedure in Studio is as follows.

Tools > Export

> Select multiple classes you want to migrate with the [Add] button

> Check [Export to local file]

2 4
0 217

When you install an IRIS or Caché instance on Windows Server, you'll usually need to install it under a specific user account that has network access permissions. This is very handy when you needs to access network resources for creating files or directly accessing printers.

TL;DR: see key takeaways at the bottom!

5 0
0 335

*** archived ***

The question has come up several times and I saw mixed answers and no quick example

My personal preference is using CPIPE device as you get back exactly the output you will get at the command line interface of your OS .
The tricky thing is to stop reading in time.
The example just displays what you normally see in your console.
it becomes useful if you look for things that you can't get from any $system.whatever()

15 5
4 2.1K

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

Introduction

Say you have a receiving system that accepts HL7 and provides error messages in field ERR:3.9 in the ACK it returns. You require a different reply code action depending on the error message, however the Reply Code Actions settings for the operation do not provide this level of granularity. One option could be to create a process that takes the ACK and then completes the action you were expecting, however things can get a bit messy if the action is to retry the message, especially when trying to view a message trace.

8 2
1 612

If you are seeing this error during import: ERROR #6301 Line: 2 Offset: 118 This does not appear to be a Cache exported file, unable to import.

This error is caused by exporting from InterSystems IRIS and trying to import into Caché. If you plan on exporting from IRIS to Caché, you can use the following qualifier to export your classes so that Caché does not throw an error on import:

w $SYSTEM.OBJ.Export(<items>,<filename>,"/exportversion=cache2018.1")

7 3
0 733

1.Background

1.1 I met a few project that their interface servers were crashed. Cutoms wanted resume server as fast as we can. their servers are running at lan,and they can't use git,there are some namesapce in the server running different service,and usualy there is only one server.

1.2 In the message,it has property in type of characterstream,as you know,the message search page doesn't support filtering with property of characterstream,so it's so hard to find the messge you want.

10 11
2 551
Article
· Mar 1, 2017 17m read
Parsing docx using XSLT

The task of handling office documents, namely docx documents, xlsx tables and pptx presentations is quite complicated. This article offers a way to parse, create and edit documents using only XSLT and ZIP.

Why? docx is the most popular document format, so the ability to generate and parse this format would always can be useful. The solution in a form of a ready-made library, can be problematic for several reasons:

  • library may not exist
  • you do not need another black box in your project
  • library restrictions : platforms, features, etc.
  • licensing
  • processing speed

In this article, I would use only basic tools for work with the docx documents.

6 3
1 6K

One of the reasons why I love Cache and Iris is that not only you can do anything you can imagine, also you can do it in a lot of different ways!!.

Imagine that you have an integration running with IRIS connected by ODBC you probably only run SQL queries but you can also create stored procedures and inside write the code to do everything you can imagine.

I'm going to give you some examples but the limit is your imagination!!

13 1
2 337

Mirroring 101

Caché mirroring is a reliable, inexpensive, and easy to implement high availability and disaster recovery solution for Caché and Ensemble-based applications. Mirroring provides automatic failover under a broad range of planned and unplanned outage scenarios, with application recovery time typically limited to seconds. Logical data replication eliminates storage as a single point of failure and a source of data corruption. Upgrades can be executed with little or no downtime.

9 22
2 7K

Integrating Cache with .net may be difficult, as we need to know both technologies and tools involved. Let’s follow the simplest possible example and see the pitfalls lurking on our way.

1. Creating .Net Assembly

.Net assembly is unit that contains compiled code and other resources.

Let’s create the simplest .Net assembly that will contain the code we want to execute.

We will use assembly of type Class Library, as we will use classes and their methods contained within. This type of assembly has .dll extension.

4 12
0 1.7K