We have a Unicode installation of Cache'. A client wants to send us documents that will be machine-read and loaded, automatically. They want to create the documents in ISO-8859-1 ("Latin-1"). We'd need to convert the text to UTF8 for our system. I saw the documentation on the $ZCONVERT function, but I didn't see this option. How should it be done?

Thanks!

00
0 10 70

anyone know of a simple way to search a blob of text from a list of keywords in one fell swoop, without having to iterate through each keyword and perform an individual search? Ex. 

s keywords="This,blob,text"

s text = "This is a sample blob of text"

i text[keywords w "hit"

00
0 2 60

If you create your own Language Extensions to Object you mostly have to find the
proper %ZLANGC00 or %ZLANGV00 or %ZLANGF00 and add the extensions manually.
A few utilities do it already automatically (ZPM, ZME, ..)
This utility allows you to add your extensions programmatically. (eg. at first run, or during installation)
I found this quite useful for my Docker-based demos as it all happens at the start time.

It is related to these articles

30
0 0 71
Question
Michoel Reach · Mar 31, 2021
End Session programmatically

We have a background job that keeps an eye on our ongoing CSP sessions, counts licenses used and some other tasks. Question: If I know the session ID (something like "wuuZ2Gwgxw"), how do I (find and) end that particular session programmatically in ObjectScript - i.e., the equivalent of %session.EndSession=1 in the csp page code?

Thanks!

Michael Reach

00
0 12 158

Background: We have our own SQL map that predates InterSystems'. A program writes an XML file for each table map class as $system.OBJ.Export would. $system.OBJ.LoadDir loads the XML files into .cls files.

The reason is a long story, but we need to update parameter EXTENTSIZE (only) in existing classes. This does not seem to happen. As a test I used $system.OBJ.Export to make an XML file and edited EXTENTSIZE in the two places it appears in the XML:

00
0 4 92
Article
Timothy Leavitt · Mar 17, 2021 3m read
Making the most of $Query

I ran into an interesting ObjectScript use case today with a general solution that I wanted to share.

Use case:

I have a JSON array (specifically, in my case, an array of issues from Jira) that I want to aggregate over a few fields - say, category, priority, and issue type. I then want to flatten the aggregates into a simple list with the total for each of the groups. Of course, for the aggregation, it makes sense to use a local array in the form:

agg(category, priority, type) = total

Such that for each record in the input array I can just:

50
0 5 177

Hey everyone.

I have a process where I create a new %Stream.FileCharacter object, specify the filename (including it's path), write data to the stream, and then save. However for some reason, if the user account does not have write access to the directory, the %Save method is still returning true even though it was unable to actually write the file to the folder.

The location is a UNC path, and I'm wondering if this is tripping me up?

00
0 3 32

I have  a SQL query that I want to run against MS SQL from cache ensemble using the SQL outbound adapter. If I run this query direct from MS SQL Studio it take about 7 seconds MAX and returns about half a million rows. The row only contains one column it is a number all same size and if I run this query in the production in ensemble it takes for ever the production finishes without getting the response back. The same query run in cache outside the ensemble environment writing results to a file it returns results taking about 3minutes to complete.

00
0 0 71

I had a challenge recently where I was asked to parse and iterate JSON to find a patient that has a forename = "Bill" and try to make the function that iterates through the code re-usable.

Being working in Healthcare there isn't much experience or demand for parsing JSON, as most of my work is HL7.

I took this on using the documentation and worked out a way to parse the JSON (see posts below for code and source data).

00
0 6 96

In previous versions of cache I used to be able to write click on a class and get a delete class option but in this version I can not find the delete class option was wondering if there is another way to delete a class if you wanted to do some house keeping.

N.B. These are the classes I create not the ones that comes with cache.

00
0 1 58

I have a quick question regarding swizzled objects.

I have an original object, say Object a, I am working with.

I set a property a.something.somethingother.somethingelse.myNewProperty  to some value x.

Then at some point I am saving a and continuing to work with it.  I assume here by saving a, I saved myNewProperty as well. (as it should work)

20
0 5 78

So now that I have figured out how to send a Page via HTTP.OutboundAdapter, I have another question. I want to use a Function that all I have to do is pass two variables and it is sent to the HTTP.OutboundAdapter I created to send the Page. 

So.. If I have a class file that Extends Ens.Rule.FunctionSet, how do I force it to send a Request to my HTTP Business Operation, without having to go through a DTL, or Business Process?

 

Thanks

Scott

00
0 3 60

I am trying to figure out how to send a Page via a HTTP.OutboundAdapter to a URL from Ensemble.

We have a URL that I am able to pass PNo=xxxx%PMsg=xxxx as parameters to send the page to a pager.

http://xxxxx.xxxxx.xxx/Employee/Tools/Paging/SendPage.aspx?PNo=1817&PMsg...

When I send the above URL through a REST client I receive a Response of "SENT".

But when I try to send it through the HTTP.OutboundAdpater I do not get a response.

00
0 3 59
Article
Chris Stewart · Feb 18, 2021 2m read
Basic JSON Compare

Hi Dev Community

I thought i would share a little method I knocked together to traverse and compare 2 JSON objects for basic equivilance.   I'm currently working on some data migration, and wanted a basic sanity check to validate that the JSON output is basically equivliant between the old and new, excluding a few things like timestamps.  

It's a basic little recurvsive method, that will bubble up any differences over a nested structure.   It's very low tech, as that's all I need it to do, but I thought it might be useful for others?

10
0 5 138
Article
Robert Cemper · Feb 16, 2021 2m read
FOREACH for ObjectScript

As you know ObjectScript has no FOREACH system command nor system function.
But it has a wide room for creativity.

The task is to loop over a global or local array and do something FOR EACH element.

There are 2 possible solutions:
- creating a macro that generates the required code sequences
- creating an Extended Command to perform the action.

60
0 3 175

As a Belgian leader in developing and operating entertainment solutions in the sports betting and casino games sector, Bingoal is a dynamic and ambitious company looking for a passionate Back-End Software Engineer. Together with the IT team, you will be working to create scalable and easy to maintain software having an impact on the core of Bingoal’s activity.

20
0 0 148

Following instructions on this page https://docs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=D2IMP_... I am trying to create a Data Connector to be used as a base class for a cube with update support.
That page suggests that putting an SQL query inside XData block is not suitable for a Data Connector that supports updates.
Later it also suggests that to enable updates your SQL query must include 

00
0 0 79