ObjectScript

Syndicate content 35 

Hello All

I'm not sure what the best practice is for this. I have a DTL for returning ORUs back to a hospital in a different time zone. They have requested that various timestamps have the time zone offset added to the HL7 format (%q%k, I think). First, I just wanted to be sure the system was aware it was DST. I was able to determine if DST is in effect like this:

Last reply 4 June 2020
0   0 2
88

views

0

rating

I am using the Java Binding to connect a Java Middleware Application to Cache.  Originally I was using a CacheListOfDataTypes (JAVATYPE = "java.lang.List") object to bring data back.  I was tasked with encrypting the data using AES and I was using the AESCBCEncrypt function on the List elements (up to 20k characters for each element) to bring it back before concatenating it on the middleware.  This almost worked.  Like 95% of the characters were being decrypted correctly but some text was coming back garbled.  I couldn't understand how this was happening.

Last reply 29 May 2020
0   1 1
83

views

0

rating

Introduction and Motivation

A unit of ObjectScript code (a ClassMethod, say) may produce a variety of unexpected side effects by interacting with parts of the system outside of its own scope and not properly cleaning up. As a non-exhaustive list, these include:

Last reply 29 May 2020
+ 15   3 5
363

views

+ 15

rating

Hi Community!

We are glad to invite every developer who uses ObjectSript and VSCode plugin to the second webinar hold by the VSCode ObjectScript plugin developer on May 26  at 11:00 EDT. 

You will learn how to develop InterSystems IRIS solutions using GitHub Development Flow with VSCode ObjectScript and Docker.

Speaker: @Dmitriy Maslennikov, InterSystems Developers Advocate, CTO at CaretDev.

+ 5   0 3
293

views

+ 5

rating

Hi ObjectScript developers!

How to Protect Your Belongings from Pests While Moving - Delicate ...

InterSystems ObjectScript is perhaps the best language on the planet to deal with globals - and it is an interpretable language.

Yes, it has a compiler. But even the compiler can compile some lines in ObjectScript which will then fire as bugs during the runtime.

There are some technics on how to avoid that such as unit testing, coding guidelines and your coding experience, of course ;)

Here I want to present to you the yet another approach to how you can reduce the number of errors in your ObjectScript runtime and enforce coding guidelines - it's an ObjectScript Quality tool developed by Lite Solutions, InterSystems solution partner.

See the details below.

+ 2   0 2
0

replies

140

views

+ 2

rating

I have the variable with literal.

Can I understand with ObjectScript that the literal is:

%String, 

or %Integer,

or %Date,

or %Double,

or %Numeric?

What I'm looking for could be:

set variable="To be or not to be"

USER>w ##class(utils).GetType(variable) 

%String

set variable=42

USER>w ##class(utils).GetType(variable) 

%Integer

 

Last reply 22 May 2020
+ 2   0 3
170

views

+ 2

rating

Hi Developers,

Please welcome the new video specially recorded by InterSystems Product Manager @Bob Kuszewski for the 3rd InterSystems Online Programming Contest on InterSystems IRIS Native API:

⏯ Using the IRIS Native API GitHub Template

 

What’s the contest about?

In the last year, InterSystems added and expanded Native APIs for Java, .NET, Python, and Node.js. The Native API provides high speed access to globals, the ability to instantiate and use ObjectScript objects, and fine-grained control over transactions.

+ 1   0 2
171

views

+ 1

rating

Hello,

 

We are trying to connect to a database through a JavaGateway.

 

We observe that the JavaGateway reports:

Failed to start the Java Gateway server: ERROR #5002: Error de cache: <UNDEFINED>zGetJavaVersion+22^%Net.Remote.Service.1 *versionWithPrefix

 

We have checked that we do have the Java Home set:

/usr/java/jdk1.8.0_65

 

And we have seen the java files in the server:

 

Last reply 20 May 2020
0   0 2
64

views

0

rating

Hi Community,

We're pleased to invite you to join the upcoming InterSystems IRIS 2020.1 Tech Talk: Integrated Development Environments on May 19 at 10:00 AM EDT!

In this edition of InterSystems IRIS 2020.1 Tech Talks, we put the spotlight on Integrated Development Environments (IDEs). We'll talk about InterSystems latest initiative with the open source ObjectScript extension to Visual Studio Code, discussing what workflows are particularly suited to this IDE, how development, support, and enhancement requests will work in an open source ecosystem, and more. 

 

+ 2   0 2
179

views

+ 2

rating

Is it possible to access (read, write) to an external Oracle database via Cache SQL Gateway using JDBC in Cache Object Script?  I am currently using ODBC successfully but wanted to see if JDBC was an option too.  If it is possible, does anyone have a basic Object Script example(s) that I can review?

Last reply 17 May 2020
0   0 3
132

views

0

rating

Hello guys, 

I have used the Studio SOAP wizard to generate some webservice client classes and amongst those classes:

Class RMH.SOAP.s0.Output Extends (%Persistent, %XML.Adaptor) [ ProcedureBlock, SqlTableName = _Output ] {
...
Property Value As %GlobalCharacterStream(XMLNAME = "Value");

And the caller looks like

Last reply 17 May 2020
+ 1   1 4
116

views

+ 1

rating

Hi Developers!

As discussed in previous parts of Package Manager stories to turn your IRIS application into a deployable package you just need to introduce the module.xml file into the root folder of the repository and describe all the resources.

I’m pleased to introduce you to a new project template on Open Exchange which contains examples of how to make different types of resources of your InterSystems IRIS application a part of the ObjectScript package and so make the deployable ObjectSctipt package.

Let's see how you can describe your application resources using this template project as an example.

See the details below.

Last reply 16 May 2020
+ 3   6 2
190

views

+ 3

rating

If two globals have same structure, how to reuse one CacheSQLStorage-based class to read both locations?

Thanks!

Update:

Let's say we have two globals:

^a(1)="dataa1"
^a(2)="dataa2"

and

^b(1)="datab1"
^b(2)="datab2"

i.e. the structure difference is global name only.

I would like to have two classes TableA and TableB both are inherited from TableAB, and TableAB taking global name as a parameter.

Last reply 13 May 2020
+ 2   0 4
186

views

+ 2

rating

Hello,

 

We would like to know if Ensemble could generate a CADES sign from a string and a certificate.

 

We have read:

https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GXML...

 

So we have seen that we could create a class, to sign a document, and store the sign inside that new class. We have also seen that there are some different algorithms to choose from, like sha1.

 

Last reply 12 May 2020
0   0 1
60

views

0

rating

Hi colleagues!

Every day Johns Hopkins University publishes new data on coronavirus COVID-19 pandemic status.

I built a simple InterSystems IRIS Analytics dashboard using InterSystems IRIS Community Edition in docker deployed on GCP Kubernetes which shows key measures of the disease outbreak.

This dashboard is an example of how information from CSV could be analyzed with IRIS Analytics and deployed to GCP Kubernetes in a form of InterSystems IRIS Community Edition.

Added the interactive map of the USA:

Last reply 10 May 2020
+ 15   1 3
461

views

+ 15

rating

Hi,

I have a bit of code that does a find and replace on a "template" and inserts additional content. For example it replaces the @DATA@ with an html table:

<html>

   <body>

      <div id="data">@DATA@</div>

   </body>

</html>

Currently doing this with the $replace function:

Set text=$replace(text, "@DATA@", data)

Last reply 7 May 2020
0   0 2
855

views

0

rating

Hi Developers!

I want to share with you the approach you can use working with Unit Testing which I personally find very convenient and robust.

Will not talk much here about Unit Testing, we have documentation, enough good articles on the topic not only on the Internet but here on Developers Community too,  e.g. this one.

How can you manage the Unit Testing of your ZPM module?

This is pretty handy with ZPM. It has a special command "test" which runs all the tests you mentioned in the module. You can execute it as shown below:

zpm:USER>module-name test

And this command runs all the tests you mentioned in module.xml.

Let's see how it works.

+ 2   2 2
0

replies

75

views

+ 2

rating

Dear All,

I'm looping through a list with characters (Parenthesis, square brackets etc) and I wish to remove these from the list.

The for loop and IF logic are effectively removing these items from a list.

However the variable I use for the maximum number of loops carries on beyond the number of items of the list after removal.

In the output value for these I get the integer of the for loop instead of a  null for the empty list fields.

I can see in the documentation that the end variable is not editable once the loop is started.

Last reply 7 May 2020
0   0 7
366

views

0

rating

It is with great pleasure that the CIUSSS de l'Estrie - CHUS is sharing the mocking framework it developed and presented at the InterSystems Summit 2017.  I will update this post with more detailed instructions in the next few weeks but I wanted to share the code and presentation quickly : 

https://gitlab.com/ciussse-drit-srd-public/Mocking-Framework

Last reply 7 May 2020
+ 9   0 8
1,096

views

+ 9

rating