#Beginner

0 Followers · 499 Posts

Beginner tag unites articles and questions for those who are getting started with InterSystems Data Platform

InterSystems staff + admins Hide everywhere
Hidden post for admin
Question Sehinde Raji · May 21, 2021

Hey I am very new to Intersystems Objectscript and I am trying to find a way of extract 4 digit numbers from a stream.

I have a stream full of results 

2334

3434

5543

4334

And I am trying to remove each 4 digit grouping from the stream.

I have tried the following for loop 

for i=1:1:$length(result) {

set curr = $extract(result, i)

write !, curr

set count(curr) = $get(count(curr)) + 1

}

Unfortunately the loop extracts one digit.

Does anyone have any suggestions on how to solve this ?

6
0 467
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
Article Mihoko Iijima · Mar 5, 2021 7m read

This article is a continuation of this post.

In the previous article, we discussed business operations' creation from the components required for system integration.

In this article, you will learn how to create a business process that calls the two business operations you have defined in the sequence order.

The business process acts as the coordinator (command center) of the process.

The processing adjustments you may want to implement in the sample include the following:

0
0 575
Article Mihoko Iijima · Mar 5, 2021 9m read

This article is a continuation of this post.

In the previous article, we discussed the development of business processes, which are part of the components required for system integration and serve as a production coordinator.

This article will discuss creating a business service, which is the information input window for production.

And finally, the last component of “Let's Use Interoperability!”

0
0 751
Question Sreeram Makam · Oct 8, 2019

Hi All, I am a Data Architect and am trying a method of deploying alter statements onto Cache DB.

My Data Modeling tool generates alters as this.. So question is if the Cache has a way to rename table? If so what is it?

ALTER TABLE <SchemaName>.GROUP_TYPE_NODES RENAME TO GROUP_TYPE_10082019140110000
;

This is giving error.

SQL Error [25] [37000]: [SQLCODE: <-25>:<Input encountered after end of query>]
[Location: <Prepare>]
[%msg: < Input (IDENTIFIER) encountered after end of query^ALTER TABLE xxx.GROUP_TYPE_NODES RENAME>]
 

4
0 823
Article Alex Kogan · Nov 15, 2020 11m read

Hello all,

               I would like to share the Foreign Key setup I recently used for my project and found it is very useful.  When asking around, I realized that there are some developers out there, who would like more information on explicit foreign key setup, so I would like to briefly discuss explicit foreign key setup and give a quick sample on how to set it up

3
1 817
Discussion Dmitry Maslennikov · Nov 9, 2020

Let's imagine you have to implement a method with a definition

/// Set value to %session.Data
ClassMethod setValue(params...) As %Status
{
}

How it should work

do ..setValue("key1", "val")

is equal to

set %session.Data("key1") = "val"

and 

do ..setValue("key1", "key2", "key3", "key4", "val")

is equal to 

set %session.Data("key1", "key2", "key3", "key4") = "val"

so, quite simple, any amount of arguments, while the latest one is a value, and any previous is an index, should accept at least 2 arguments.

How would you implement this method?

15
0 330
Question Fanny Van · May 16, 2018

Hey everyone, 

Here's my issue, I would like to develop a web application which use and send datas to TrakCare app, but I really don't know how to communicate with TrakCare's datas. 

With a little research, I think I could use "RESTForms" or "EnsembleWorkFlow" but I don't really get how...
Can somebody help me and tell me the way forward ?

3
0 633
Question Luiz Henrique Carvalho Martarelli · Jul 24, 2020

Hello people!

I am Brazilian and I am starting to work with the latest version of CACHE, and I would like to know where I can see an example of a TRIGGER, I would like to validate the fields before writing the actual data in the database.

in advance, thank you very much! and sorry for any mistake in concordance in english

7
0 723
Question Eduard Lebedyuk · Jul 6, 2018

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:

%SYS>
TRY {
      ^
<SYNTAX>
%SYS>

WRITE 1/0
^
<DIVIDE>
%SYS>

CATCH {}
^
<SYNTAX>
%SYS>

I know that I can write it all in 1 line, but I'd rather not do that. Is there a way to feed multiline statement into Cache?

8
0 1330
Article Sergey Mikhailenko · Jun 2, 2020 8m read

When you first start working with InterSystems IRIS, it’s a common practice to install a system with only a minimum level of security. You have to enter passwords fewer times and this makes it easier to work with development services and web applications when you're first getting acquainted. And, sometimes, minimal security is more convenient for deploying a developed project or solution. And yet there comes a moment when you need to move your project out of development, into an Internet environment that’s very likely hostile, and it needs to be tested with the maximum security settings (that is, completely locked down) before being deployed to production. And that’s what we’ll discuss in this article. For more complete coverage of DBMS security issues in InterSystems Caché, Ensemble, and IRIS, you may want to read my other article, Recommendations on installing the InterSystems Caché DBMS for a production environment. The security system in InterSystems IRIS is based on the concept of applying different security settings for different categories: users, roles, services, resources, privileges, and applications. Users can be assigned roles. Users and roles can have privileges on resources — databases, services, and applications — with varying read, write, and use rights. Users and roles can also have SQL privileges on the SQL tables located in databases.

2
3 1139
Article Renato Banzai · Jun 1, 2020 4m read

Making a Chart using Intersystems IRIS + Python

How to use the IRIS Native API in Python to access globals and plot some charts.

Why Python?

With a large adoption and use in the world, Python have a great community and a lot of accelerators | libraries to deploy any kind of application. If you are curious (https://www.python.org/about/apps/)

Why COVID-19 Data

1
0 500
Article Eduard Lebedyuk · Jul 16, 2019 4m read

When I describe InterSystems IRIS to more technically-minded people, I always start with how it is a multimodel DBMS at its core.

In my opinion that is its main advantage (on the DBMS side). And the data is stored only once. You just choose the access API you want to use.

  • You want some sort of summary for your data? Use SQL!
  • Do you want to work extensively with one record? Use objects!
  • Want to access or set one value and you know the key? Use globals!
1
5 1626
Question Michael Davidovich · Apr 1, 2019

Currently, when we want to write data to a file that will be viewed in Excel, we parse the data in tab deliminated format to the file and name it with .xls at the end.  That is sent to end users via email.  They get a warning that the data is not formatted properly (it's not really an Excel file after all) but it does display somewhat correctly as the tabs are understood (this does not work if we deliminated with commas however).

28
3 4153
Question Scott Roth · Jan 23, 2020

Ok so I am way outside of my comfort zone, and had to build an application using CSP to give users the ability to access SQL configuration tables. These SQL Configuration tables will affect the data that is sent to the downstream system. 

I saw in the examples where we were able to import GIF's/IMAGES into the CSP folders to use as a reference in our CSP pages. My question is how do you do that? If I try to import through studio, it tells me the file is invalid.

Just trying to make it a little more user friendly then blocks on a page.

We are currently using Health Share 2018.1.3

Thanks

Scott

1
0 1032
Question Ilmija Asani · Jan 16, 2020

Hello community,

I'm new to Objectscript and Intersystems development. I've read documentation and some examples and succeded to import my Java class  file into HealthShare using the Java Gateway Service. To import my class i tryed both methods (Wizard, or scripting) with success.

Everything works great, i see my imported class inside the namespace, and i can call the methods.

6
0 600
Question Eduard Lebedyuk · Jan 15, 2020

How do I rename class programmatically?

This discussion touches on data move which, is not a concern in my case (BPL renames).

I also don't care about external references.

The best I got is:

  1. Get class text as string
  2. Replace class name in this string
  3. Save new string as new class
  4. Open new class as object
  5. Delete storage
  6. Compile class

Are there any better alternatives?

Also found this discussion.

5
1 606
Article Eduard Lebedyuk · Jan 13, 2020 1m read

While and for are pretty similar, but sometimes you need to do a not recommended thing - change cycle boundaries.

In this situation while and for are different. For calculates boundaries once per run and while calculates boundaries on every iteration.

Consider this code sample:

set x = 5
for i=1:1:x {
     write "i: ", i,", x: ", x,!
     set x = x+1
}

You'll get this output:

i: 1, x: 5
i: 2, x: 6
i: 3, x: 7
i: 4, x: 8
i: 5, x: 9

Compare to while cycle:

set i = 1
set x = 5
while (i<=x) {
    write "i: ", i,", x: ", x,!
    set x = x+1
    set i = i+1
}

The output is infinite:

7
0 491
Article Patrick Jamieson · Apr 22, 2019 8m read

Launching IRIS Using Docker

This brief document will walk through the steps to launch IRIS community edition using Docker on the MAC. For those new to Docker, the first two pages explain how to install Docker, and run some basic commands that will be needed to get the IRIS community edition running. Experienced Docker users can skip directly to page three.

3
4 2486
Discussion Evgeny Shvarov · Aug 31, 2019

Hi Developers!

Often we need to use relatively small arrays with constants, static arrays in algorithms, etc where we need to do something with each element of an array. There are several ways to deal with it in ObjectSctipt. 

Previously I used to use globals, locals, PPG for this but not so long time ago figured out that %List is a way too handy.

Indeed, suppose we have an array of months and need to set up and use it in our code.

15
1 690
Question Jess Farmer · Mar 6, 2019

I am under the impression that inside HealthShare you can Services, Processes, and Operations. The service takes incoming data, the processes can process that data, and then the operations can send that data out.

I am curious if anyone has any experience, guides, or advice on how I can send data to a service using a Java application. I intend for the data to be in XML format. I am also curious if I succeed at picking up the data in the service, how I send the data back to the Java application using an Operation.

As of now I am attempting to get this to work on a local environment.

2
0 382
Article Eduard Lebedyuk · Dec 9, 2019 1m read

If you work with anything other than English, you would earlier or later encounter the characters from the title or just plain ??????????.

Encodings are usually known, but sometimes you just get gibberish and need to make sense of it.

In this cases $zcvt is your friend, the three argument form specifically.

But there are a lot of options. So here's an utility script to check how the text would look like in different encodings:

4
0 446