Question
· Feb 12, 2016
Get columns dynamically?

In MSSQL I think you can do something like this:

select *
from HS_IHE_ATNA_Repository.COLUMNS
where TABLE_NAME='Aggregation'

How can I do this in Cache SQL?

[%msg: < Table 'HS_IHE_ATNA_REPOSITORY.COLUMNS' not found>]

0 11
1 2.1K

Good day,

I would like to know how to detect in Caché ObjectScript if data saved in string is number and furthermore, if it's type is integer.


I maybe found a solution:

set value = "44.2d3"

try{
set status = $INUMBER(value,"")
if ('$FIND(+value,".")){
w "your variable: '"_value_"' is number and integer"
}else{
w "variable is number but no integer"
}
}catch(e){
w "variable is not number"
}

0 10
0 1.8K

I need to know if given package exists or not.

Currently found two solution - one doesn't work, another works but I don't like it.

Solution 1.

I started, of course, with %Dictionary package - it has PackageDefinition class after all.

However, %ExistsId returned 0 on packages that clearly do exist, so I went to %LoadData, it uses this macro to determine if the package exist:

0 10
0 331

Globals, these magic swords for storing data, have been around for a while, but not many people can use them efficiently or know about this super-weapon altogether.

If you use globals for tasks where they truly shine, the results may be amazing, either in terms of increased performance or dramatic simplification of the overall solution (1, 2).

Globals offer a special way of storing and processing data, which is completely different from SQL tables. They were first introduced in 1966 in the M(UMPS) programming language, which was initially used in medical databases. It is still used in the same way, but has also been adopted by some other industries where reliability and high performance are top priorities: finance, trading, etc.

Later M(UMPS) evolved into Caché ObjectScript (COS). COS was developed by InterSystems as a superset of M. The original language is still accepted by developers' community and alive in a few implementations. There are several signs of activity around the web: MUMPS Google group, Mumps User's group), effective ISO Standard, etc.

Modern global based DBMS supports transactions, journaling, replication, partitioning. It means that they can be used for building modern, reliable and fast distributed systems.

Globals do not restrict you to the boundaries of the relational model. They give you the freedom of creating data structures optimized for particular tasks. For many applications reasonable use of globals can be a real silver bullet offering speeds that developers of conventional relational applications can only dream of.

Globals as a method of storing data can be used in many modern programming languages, both high- and low-level. Therefore, this article will focus specifically on globals and not the language they once came from.

14 10
0 2.3K
Question
· Dec 15, 2017
cache operator

In if condition what is the difference between specifying the single operator and double operator? For example, what is the difference between (&& and &) or (|| and !)

0 9
0 697
Article
· Jun 20, 2016 4m read
NewBie's Corner Session 8 Not

NewBie's Corner Session 8 Not

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out these commands.

NOT operator ('), single quote or apostrophe

The "NOT" operator reverses the truth-value and is intended for numeric operands, however it can be used on alphanumeric operands.

0 9
0 442
Question
· Jul 21, 2017
Ens.StreamContainer

Hi All,

I am fairly new to Ensemble and I wanted to know I have inbound business service (EnsLib.File.PassthroughService) which is looking for pdf files once it finds a pdf file (within the business process) it needs to find the associated xml file which would be in the same directory. Once both of these files are found they need to be sent to the business operation and deleted from the source (EnsLib.File.PassthroughOperation).

0 9
0 1.4K
Question
· Oct 19, 2016
Upgrade to Ensemble 2016

Hi All,

We are Upgrading the Application from Ensemble 2009 to 2016.1. We have imported the user, Roles and Resources.
But the Sql Tables and Sql Procedures are not being visible in Management portal -> Security Management -> User.
Please give me a solution or basics steps for importing those.

Thanks,
Manoj J

1 9
0 455

Hi Developers!

Often I find questions on how to install IRIS, connect to IRIS from IDE, setup the environment, compile, debug, maintain the repository.

Here below possibly the shortest way to set up all the environment and start development with ObjectScript on InterSystems IRIS.

Prerequisites

Make sure you have Git, Docker, and VSCode installed

Install Docker and ObjectScript extensions into VSCode

Sign in or Create an account on Github

Here we go!

5 9
5 1.3K
Question
· Mar 31, 2017
Atelier BPL editor

Is there a way to graphically edit BPL processes, or do we still need to use Studio for doing that?

Looking at the documentation, it appear there should be an Atelier BPL editor option available under Open With, but all I have is Atelier Class, HTML, INT, and MAC editors.

There is a BPL editor in the list, but it throws a "Bad editor input" error when trying to open the class file.

0 9
1 1.1K
Question
· May 17, 2017
Soap Wizard

HI,

Please let us know the solution to the below error:

ERROR:#5388 - You do not have write permission on the database class .
%SOAP.WebClient is in , so class lock cannot be obtained .

Thanks,
Shobha

0 8
0 860

Consider the below scenario:

1. HL7 Service -> Process

2. DTL makes a call to a webservice (Post) via a REST operation via SendRequestSync call.

a. if the post is successful, end the DTL

b. if the server that hosts the webservice is down, i would like to keep retrying with the same message and not lose any messages in the queue.

does a simple "quit 0" at the DTL will rollback the message and will retry? please let me know how not to lose any messages if the webservice server is down.

Appreciate it.

1 8
1 480

Hi, Community!

Someday you find yourself having a wonderful class package which can be helpful in several projects. So it is a library package.

How to make the classes available for different namespaces in Caché? There are two ways (at least two ways familiar to me):

1. Start the name of the package with %, like %FantasticLib.SuperClass. Wrong way.

If you do that the class would be placed in %SYS and would be available in other namespaces.

This is wrong because of the two reasons:

2 8
0 539

Hi all!

In this article I would like to review those VS Code extensions which I use myself to work with InterSystems and which make my work much more convenient. I am sure this article will be useful for those who are just starting their journey to learn InterSystems technologies. However, I also hope that this article could be useful for experienced developers with many years of experience and open up new possibilities for them when using VS Code for development.

37 8
6 1.3K

I'd like to have production specific settings for different environments (OTAP). I have set the system default settings on my production to override the default settings. However, this does not seem to work. It is my understanding that the system default settings override the settings I have set on the production (I thought I heard my Sales Engineer say this). However, reading the documentation I am not sure of this reading either. However, when I clear the values for the adapters on my production my system default settings are still not apply.

0 8
0 807

Let's say I have this simple script file try.script

write 1
write 0

I can execute it in a terminal (csession) by calling:

csession cache < try.script

And I get the following output:

%SYS>
1
%SYS>
0

However I want to use a try catch block in my script:

try {
write 1/0
catch {}
halt

But as script is executed line by line, it's interpreted like this:

0 8
0 1.1K