Hi,
I want to write a class to write a customized SSL/TLS certificate expiry alerts using ObjectScript?
Any sample code for reference available?
Thanks,
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,
I want to write a class to write a customized SSL/TLS certificate expiry alerts using ObjectScript?
Any sample code for reference available?
Thanks,
Hello developers,
In this article, I'll show you how to run code at compile time with ObjectScript macros.
Here's a use case that recently led me to use this feature:
As part of a medical application developed for more than 20 years, we have a large number of parameters. Although we have procedures for documenting these settings, it can be helpful to have a quick view of which settings are actually used by the application code.
To get this view, we could search the code with regular expressions.
Is it possible to "Ping" a remote host in IRIS for Health using ObjectScript? We host hundreds of TCP connections over hundreds of VPNs. I'm working on a project that would make it nice to have way to ping remove clients over the VPN to monitor connectivity and keep the tunnels alive.
Another thought/method would be to make an OS system call (AWS Linux), but I don't see a way to do that either.
Hi,
Can anyone please help me to display date field in the format DDMMYYYY which I need single digit date needs to have leading 0 like 01022000.
I tried to-char but leading 0 is not there.
I am writing object script with the help of sql query for generating extracts.
can anyone please help on this.
thanks
jude
Hello,
as i'm trying to develop a operation and its methods (SQL adapter), I'm running into issues when i run my test class.
I have the class i want to test in the very same folder as my test class.
I followed the tutorial in the documentation.
When i run the test class, i get the following message error :
LogStateStatus:0::ERREUR #5002: Erreur Cache: <METHOD DOES NOT EXIST>zTestAdd+1^unitTests.testMyClass.1 *myMethod,Package.BO.MyClass
Here is my test class (heavily inspired bythe documentation :-) :
Class unitTests.testSqlInscription Extends %UnitTest.
You can avoid the error by specifying a stream object as the argument of %ToJSON() used when generating a JSON string from a dynamic object.
A code example is below.
USER>set temp=##class(%Stream.TmpCharacter).%New()
USER>set jsonobj={}
USER>set jsonobj.pro1=["a","b","c","d"]
USER>set jsonobj.pro2=["あ","い","う","え"]
USER>do jsonobj.%ToJSON(temp)
USER>write temp.Size
51
USER>write temp.Read()
{"pro1":["a","b","c","d"],"pro2":["あ","い","う","え"]}See also the documentation for details.
on red hat, but I would also be interested in a wider answer.
after running a benchmark for 40 minutes, I have been asked if any rollbacks occurred in that time. Rollbacks from SQL or objects.
The application does not record this, so I am looking for a system level record.
The journal entries do the necessary reverse sets and commit just like any transaction. So i don't think i can detect them there.
The SQL documentation says "Messages indicating that a rollback occurred, and errors encountered during the rollback operation are logged in the cconsole.
Hi Community ,
I am using %Date Property for defining one csv source message class .Please refer below class
Class CSVtoHL7.
{
Property LastName As %String;
Property FirstName As %String;
Property MiddleName As %String;
Property DOB As %Date;
Property Gender As %String;
}
Please refer to data transformation class
{
<transform sourceClass='CSVtoHL7.Inputfile.Record' targetClass='EnsLib.HL7.
Hi there,
I want to use regex in my code, and I saw that the %Regex.Matcher class contains a property "OperationLimit" that you can also set to a number of steps that the regex engine should take maximum in analysing a given string. So far so good.
I tried to set the property with the function OperationLimitSet() to a silly value like 3. In 3 steps only very few regex should be executed, right? But what I found is that my regex always comes up with a solution. Here is what I did:
First I initialised my %Regex.Matcher.
set m = ##class(%Regex.Matcher).%New("(.+)\@(.+)\.(.+)")
do m.Hello Community,
To get to my problem, I need to elaborate a bit. We use an older fixed length format called HCM to transfer data from our SAP-ISH system to the Intersystems server. The data file is generated on a dedicated server and stored in a directory that is mounted to the communication server.
The synchrnoization is done via a lock file, which is exclusively locked in the adapter.
Now this, let's call it HCM server, is to be replaced. The old server is a CentOS 6.4 (Final) (uname -rv: 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 23:51:20 UTC 2013), the new server is a SLES15.
Hi !
I'm looking for a simple way to store in a string a list in $lb representation. Ex :
Set list = $ListBuild("data2", "data2", "data3")
ZWrite list
/* show : list=$lb("data1","data2","data3") */With the ZWrite command, we can display the $lb representation but I would like to store it in a string variable.
Hey, I'm working with HealthShare 2016.2 and trying to implement a custom integration using ObjectScript. I have followed the usual syntax for setting up the integration, but I keep getting an undefined variable' error. Has anyone encountered a similar issue? Here's a snippet of the code I'm using :
set customData = 'Sample Data';
write customData;
Way back when during our Siemens LCR days we had to limit the number of characters in OBX.5 to a length of 75. That was back when we had eGate.
Now I need to do the reversal of that and take loop through a string length and split the string up into multiple OBX or NTE based on a certain length. In reading documentation $EXTRACT can do this if you know the exact length, but in this case we don't.
So how would one loop through a string and say every 75 characters create a new OBX or NTE segment?
Thanks
Scott
We are trying to create a simple class extending %RegisteredObject that could be used as a singleton. However we are not able to store it in a global to later be retrieved (by the same process but elsewhere in the code).
I resumed my issue in this small code sample :
{
// Create a simple %RegisteredObject
set obj = ##class(%ZEN.proxyObject).%New()
set obj.MyProp = 22
do ##class(%SYSTEM.OBJ).Dump(obj)
// Store it in a global
set ^MyGlobalName = obj
write "Stored : " _ obj,!!
// Retrieve it from the global
#Dim obj2 As
Hi,
I'm currently looking to deploy a production with readymade auditing functionality. I can currently call user defined audit entries using
Hello Everyone,
Last month, we asked for input from the IRIS community regarding exam topics for our InterSystems IRIS SQL Specialist and Expert exams. We will close the window for providing feedback on the exam topics on Thursday, August 31st, 2023. Thus, if you would like to have your say in what topics are covered on the exam, this is your last chance!
To show our appreciation for helping us validate our exam design, we will hold a raffle where 15 survey respondents will be chosen to receive a $50 gift card. The gift card is a Tango Card that can be redeemed at any number of online retailers.
Hi,
i'm starting to try to switch to VS Code with ISC integration plugins.
Everything seems fine until i get to and environment with CCR enabled. I can't open any class in RW and i don't know how to check the class out.
Is it supported? What do i need to do to use it?
Thanks
Pietro
As noted in the previous article Native API has some limits.
So I did some research on a more Terminal-like interface that
provides me with access like a console or the IRIS terminal
to allow my $QUERY over a global and other nice commands
that are not supported/mapped in NativeAPI for ObjectScript.
The basic tools are well-prepared and available.
There is just no method CommandLine and some already prepared code is needed.
Class Contatos.Amiguinho Extends %Persistent
{
Property Moradia As Cidade;
Relationship Trabalho As Contatos.Empresa [ Cardinality = one, Inverse = Nomedaempresa ];
}
------------------------Routine-----------------------------------
Set objcontato=##class(Contatos.Amiguinho).%New()
Set IDm=3,IDt=2
Set objcontato.Moradia=##class(Contatos.Cidade).%OpenId(IDm) ;<-- it works for "Property Moradia As Cidade"
Set objcontato.Trabalho=##class(Contatos.Empresa).%OpenId(IDt) ;<-- it doesn't works for "Relationship Trabalho As Contatos.Empresa"
Set ret=objcontato.
This question originally appeared in the comments of the post: Download globals from a particular server
This article was inspired by a recent question from @Evgeny.
Hy,
I have a question how to call another methode inside the main method ?
Hi All,
We're doing our first babysteps with embedded Python and IRIS with an interoperability solution. We want to convert a CSV file to an Excel xlt file.
As service we've got a EnsLib.File.PassthroughService which picks up a csv file
As operation we've got a EnsLib.File.PassthroughOperation which writes the Excel file.
In the middle:
We've created an Business Process with an %Stream.GlobalCharacter in the Request and a %Stream.GlobalCharacter in the Response.
But how do we get the %Stream.GlobalCharacter in the Python ClassMethod?
Hi,
Any recommendations on how i can add a logic if an incoming record that is already existing in the table but different total amount value. I need to subtract the totalamt value on the input file vs the totalamt value on the table and update the table with the difference of totalamt. Any help is much appreciated. Thanks!
s tEntEpicMoopRecord = ##class(MC.Data.EntEpicMoopFile).MemberIDIndexOpen(pRequest.MemberID)
if $ISOBJECT(tEntEpicMoopRecord) {
s tEntEpicMoopRecord.DateUpdated = +$h
s tSC = tEntEpicMoopRecord.%Save()
}
else {
s tEntEpicMoopRecord = ##class(MC.Data.
Hi Developers, I'm currently doing a demo about building a front end UI doing data analytics and setup a performance test with large data objects, therefore using "Populate Utility" could help me auto generate some sample data that I can play with.
Within this post I would like to share my experience of using Populate Utility, including using POPSPEC Parameter.
1.
Whether the value of a local variable is an OREF or not can be determined using $IsObject(). Let v be the variable you want to check,
$IsObject(v)=1 // v is an OREF
$IsObject(v)=0 // v is not an OREF
$IsObject(v)=-1 // v is an OREF but does not point to a valid objectNote that $IsObject(v) will give an UNDEFINED error if v is undefined.
To avoid UNDEFINED errors, it is recommended to use $Get like this:
$IsObject($Get(v))SQLBuilder is a flexible and powerful SQL query string builder for InterSystems IRIS,
With SQLBuilder you have nice and clean object oriented methods, instead of having to use concatenation and substituition to generate dynamic queries.


If you like it, don't forget to vote in the IRIS Programming Contest
I have a list type data object, that has both null entries and locked entries. While iterating through the list items using GetAt() function, a locked item is satisfying the not null condition. But I need a different conditional statement for null items and locked items.
I am trying to write a class method to return the value of a object element. Input to method is the object and element. I am not getting a value returned. What am I missing?
{
quit:pField="" "" set tResponse=""
set tResponse = pObject.
A customer wants to create an IRIS for Health business rule via the graphical editor, and then to execute that rule in ObjectScript without the context of an interoperability production. Is this possible, and if so, how?
It can sometimes be useful to list or export all of the subclasses that are derived, directly or indirectly, from a given class. In Studio, the Class -> Derived Classes menu option will show such a list, but I'm not aware of a built-in API for programmatically exporting their source code.
Yesterday I wrote some code for exporting derived classes, and I'm thinking about cleaning it up and putting it on Open Exchange. But if there's a simple way to do this that someone has already figured out, I'd be happy to know about that (and help others find that solution) rather than reinventing the wheel.