Hi Developers,
It's December the 1st! And this means that the Advent of Code 2019 has been started!
And you are very welcome to participate in the ObjectScript contest!
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hi Developers,
It's December the 1st! And this means that the Advent of Code 2019 has been started!
And you are very welcome to participate in the ObjectScript contest!
Hello team,
I am trying to do a basic read file of HL7 messages. Need to count how many FT1 segments are there in each file and how many messages are in each file.
Any help will be appreciated. I have the stream object.
Just need to loop through the stream and get the info in some way.
Any help will be appreciated.
Thanks,
Jimmy Christian.
Hi everyone,
I've encountered this annoying issue so many times before, if any one also encounter this issue, please share here if you have any solution.
So, I've been working on a web service project using HealthShare 2015. Sometimes I have to set a debug target to a csp file to debug it. If I pause the debug process about 3 minutes above or so (to examine an object, variable, etc..) the studio will hang.
After that, If I still try to click to the studio, the pop-up will appear to ask if I want to restart the
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.
Hello, Community!
After beta testing the new exam InterSystems IRIS Core Solutions Developer Specialist at Global Summit 2019, the Certification Team of InterSystems Learning Services has performed the necessary calibration and adjustments to release it to our community. It is now ready for purchase and scheduling in InterSystems exam catalog.
This is InterSystems first certification exam to feature mainly code samples as question topics. To give potential candidates a sample of the exam's content, practice questions have been published to help orient to exam question approaches and content.
Does anyone know of an API that will do a hostname look-up based on IP? We could of course use call-out but the format of the results vary based on OS and if there is already an ObjectScript tool which will parse this then we'd rather use what is already available.
Thanks!
Ben
Hi All,
I trying to get the DisplayList data of the ValueLIst from Java using Springboot. when I try to get the DislayList data via java code but I'm getting the VALUELIST data. I don't get any idea to get that DisplayList data. Below is the example
Java Code:
public String PetName;
public List<Pet> getPet() {
return ser.findAll();
}
List<Pet> arrayList = getPet();
for (Patient list : arrayList) {
String pet= list.getPet();
System.out.
Hello, InterSystems community!
Lately, you have probably heard of the new InterSystems Package Manager - ZPM. If you're familiar with it or with such package managers as NPM, Dep, pip/PyPI, etc. or just know what is it all about -- this question is for you! The question I want to arise is actually a system design question, or, in other words, "how should ZPM implement it".
In short, ZPM (the new package manager) allows you to install packages/software to your InterSystems product in a very convenient, manageable way.
I've been having a blast with the Advent of Code puzzles this year - though I'll be heading into a busy span of time with family soon and will probably drop off toward the end. (At least, that's what always seems to happen - it's a good thing, though!)
I had a whole plane ride to play around with Day 13 and wanted to share some fun terminal tricks.
s txt(1)="1"
s txt(2) = "2"
s txt(3)="3"
...
s txt(n)="n"
Instead of hardcoding "d ..write(txt1(1),txt(2),txt(3))"
Is it possible to write code to generate the input parameters to do d ..write(txt1)...txt(n))?
{
s cnt = $GET(Arg, 0)
}
Hi All,
I have a ZEN report, which gives a PDF output, i want to generate this report programmatically, save to a location in the disk. Here is my method so far
ClassMethod GenerateReport(ReportID, ReportClass, P1, P2, P3, P4, P5, P6, P7, P8, P9, PUser, PUserID, PUserProfileID, mode = 2, ByRef outputfile = "") As %Status { set filename="" set ZenClassName=$piece(ReportClass,".cls") set oRpt=$classmethod(ZenClassName,"%New") set oRpt.RUID=##class(websys.Report).GetRUID(P1,P2,P3,P4,P5,P6,P7,P8,P9,PUser,PUserID,"",PUserProfileID) set FileExt=.
ObjectScript has at least three ways of handling errors (status codes, exceptions, SQLCODE, etc.). Most of the system code uses statuses but exceptions are easier to handle for a number of reasons. Working with legacy code you spend some time translating between the different techniques. I use these snippets a lot for reference. Hopefully they're useful to others as well.
///Status from SQLCODE: set st = $$$ERROR($$$SQLError, SQLCODE, $g(%msg)) //embedded SQL set st = $$$ERROR($$$SQLError, rs.%SQLCODE, $g(rs.%Message)) //dynamic SQL ///Exception from SQLCODE: throw ##class(%Exception.
Hi Developers!
For those who want to participate in the Advent of Code 2019 and code with ObjectScript in IRIS, I created a very simple but handy Github Template.
Use the green button

to copy template in your own repo, clone the repo and run in the repo folder:
docker-compose up -d
you will get InterSystems IRIS 2019.4 Community Edition running with the template classes to load input data from files and Day1 solution.
This is also set up to start crafting solutions of Advent of Code 2019 and edit, compile and debug ObjectScript with VSCode addon.
Happy coding with Advent of Code 2019!
I'm pleased to announce the latest version of the renewed for ObjectScript, which is now available with a lot of new features.
This new extension is a fork of previously developed extension in different repository originally started by @Oleg.Dmitrovich9110.
Hello,
I make some changes in our ObjectScript code between our prod environment and dev environment in the process 'Hl7AdtFileIsoslBp'.
The operation is a class with "EnsLib.TCP.TextLineOutboundAdapter".
In prod:
.png)
In dev:
.png)
Like you can see, I don't have the contents of the text file.
I checked a lot of parameters but it seems identical.
The content of file is correctly received through TCP. So the only glitch is I don't see it in the 'View Full Contents'.
Best Regards.
When using $SYSTEM.Status.DecomposeStatus(tSC, .tErrorList) in ObjectScript to get the lsit of errors (I need to do this so that I can generate a custom JSON with the error messages) what is the type of tErrorList returned and how to intialize?
I need to know the type to iterate through it, I have tried dynamic array methods sich as %Size() also $LISTLENGTH to get the size, but both fails, so obviously not that, and being new to InterSystems I find the documentation assumes a new person knows what is behind the classes and how it was implemented from the start.
I have SQLCompute with SQLComputeCode on a couple of Properties in my class.
These work fin when I insert/update via ObjectScript or SQL from the ManagementPortal.
However, if I insert (create new record) via my C# app using the Caché ODBC DLL the SQLCompute is ignored, it does not run.
Is this expected InterSystems Caché behaviour? We are on latest IRIS platform.
I'm pleased to announce the latest version of extensions for ObjectScript. Just a month has gone since my latest update, and I already have something new to show.
Important. In this version connection to the server will be disabled by default. You have to activate connection through the settings:"objectscript.conn.active" = true.
Hello Everyone,
I'm want to know, what is more common for your company to use, the abbreviation syntax or the complety name of commands, and why?
Ex.
S VAR=10 / D FUNC^ROUTINE F 1:1:1000
Set VAR=10 / Do Func^Routine / For 1:1:1000
set var=10 / do func^routine / for 1:1:1000
Here in my company, we are familiar with the abbreviation syntax, because to spell is more faster.
Good Morning-
I am currently looking for a Cache ObjectScript Developer. Please see job description below. If you are interested please send an email to paul.lilienfeld@libertyits.
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
(1).png)
Sign in or Create an account on Github
Here we go!
In the previous article, I have demonstrated a simple way to record data changes. At this time I have changed the "Audit Abstract Class" which is responsible for recording audit data and the data structure where the audit log will be recorded.
I have changed the data structure to a parent and child structure where there will be two tables to record the "transaction" and the "fields its values" changed on that transaction.
Take a look at the new data model:

Take a look at the code changed from "Audit Class":
I have a custom written date, setup as myDate in my application, which always behaved fine for years, and now it's acting a little weird.
When I run SQL in Display mode the date shows as 1/10/1841 for some but not ALL rows.
When I run the same exact query in logical Mode the date shows normal format, in my case, for example 10/1/2019. When the application is running is shows the incorrect date. When I run the terminal session and open a ref point and ask to write a date is shows 10/1/2019, but I am expecting internal format here - 65287.
I was wondering what is causing this issue.
Hello! I have basic web services application that java clients connect to the cache web services. Using the browser, the user enters in the following url.
which runs a soap method called FoiaApp30. I am not sure how to add https security to the web service calls. I have reviewed documentation pertaining configuring SST/TTL configuration and other information. Can somebody please help me out on what I need to do?
Hi Everyone,
New Coding Talk, recorded by @Evgeny Shvarov, is already on InterSystems Developers YouTube:
GitHub Repository Template To Develop and Debug ObjectScript in InterSystems IRIS
I must be missing something. We have done encoded PDF's in the past with the Encoded PDF in OBX.5.5. When I have used this code in the past I was only working with 1 OBX, but I have a case where I am having multiple OBX's and having to loop through them and I am renumbering the outbound OBX.
<![CDATA[ // OBX]]></code>
<assign value='1' property='varOBXindex' action='set' />
<assign value='1' property='varOBX1' action='set' />
<foreach property='source.{ORCgrp(1).OBRgrp(1).OBXgrp()}' key='k1' >
<if condition='source.{ORCgrp(1).OBRgrp(1).OBXgrp(k1).
Hi Community,
As you may know, we successfully held InterSystems Developers Meetup in Boston at Global Summit 2019. And now it's time to find out which solutions development on InterSystems IRIS have been discussed!
Please welcome the Meetup video recording on InterSystems Developers YouTube Channel:
⏯ InterSystems Developers Meetup - Global Summit 2019
Hi Developers,
New Coding Talk, recorded by @Evgeny Shvarov, is available on InterSystems Developers YouTube:
🎯 Creating REST API with InterSystems IRIS, ObjectScript and Docker
I am reading the following code in ObjectScript:
And there is a sentence which I am facing difficulties to understand:
kill ^OPNLib.Game.CWLF(..World)
I know that kill removes variables, OPNLib.Game are the package and subpackage, and ..World is a property. However what does CWLF mean?
You could think that it is the class' name, but it is:
Class OPNLib.Game.ConwayLifeGame Extends %Persistent
The class name is ConwayLifeGame
Is CWLF an alias for the class name?
If yes where is it