ObjectScript

Syndicate content 35 

I face the challenge to have a bunch of classes on IRIS and CACHÉ in parallel
until all systems are migrated to IRIS.

Applying changes in Caché development environment and moving  to IRIS is no problem

But if I have to apply a fix on IRIS there seems to be no clean way back to Caché. 

Last reply 22 July 2020
+ 6   2 4
401

views

+ 6

rating

I need to set and use some context variables in a transformation (written in DTL), but the code is manually written.

When writing the same as BPL I define context variables and they are visible in transformations called by that process.

In something like this my.DTLtransform sets HL7 message fields to values in context variables:

Last reply 9 July 2020
0   1 5
93

views

0

rating

I'm working with VS Code on Centos 8. When I install the ObjectScript extension the installation succeeds, but the InterSystems icon never appears in the left-side panel. I can change settings for the extension - set the server info, etc. No errors show-up in the VS Code debug log.

UPDATE: the same thing happens on MacOS when using VS Code 1.46.1 and InterSystems ObjectScript extension 0.8.6

Can anyone suggest next steps for me to troubleshoot? Is there another log I should check?

Last reply 2 July 2020
0   0 3
78

views

0

rating

Hi all

Does anyone have an easy way of reading the cdata in the xml response returned buy a Webservice?

At the moment I have a XML class and then I use read.Correlate() to read through that XML bit.  

However, depending on the message I have different things in the CData and I don't want to create a class for each one of these.

The API returns the cddata as KeyValueOfstringstring.

Last reply 23 June 2020
0   0 1
70

views

0

rating

I have a code tag that performs some logic in a DTL, and want to add to it the ability to find the number of substrings delimited by a dollar sign ($) within a particular string. I have tried the following which compiles just fine, but generates an error when testing in the Data Transformation Builder.

Last reply 18 June 2020
0   0 1
73

views

0

rating

Hi Everyone,

We are trying to migrate old server to new infrastructure and need to sync all the DTL cls from old one to new one. There are hundreds of DTL in system and we tried to export from production but cannot select all at once which might cause some missing classes. Not able to connect to studio or atelier with that server neither. Is there any way that we are able to do mass export from system which will save some effort? Please let me know your thoughts. Thanks.

Last reply 12 June 2020
0   0 3
70

views

0

rating

Say I have an ObjectScript object called Book. It has 2 properties title and author. It extends JSON.%Adaptor, so I can call book.%JSONExport() and get this output:

{ "title": "For Whom the Bell Tolls", "author": "Hemmingway" }

In my web service I want to have a search function that returns an array of Books along with the total number of responses, like this: 

Last reply 10 June 2020
0   0 3
160

views

0

rating

Dear All, 

I am currently working on a project to record ORU^R01 into a global for a particular set of tests.

I have multiple OBX repeats that need to go into a specific fields withing one row/ record on the global.

I am having trouble finding a way to either count or loop though the OBX's correctly in ObjectScript often with the counter being undefined.

I have done this this way, as I am building upon an existing class to populate this global.

The latest iteration of my obx looping code is below:

            

Last reply 9 June 2020
0   0 3
115

views

0

rating

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

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

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