Question Brian Schoen · Aug 30, 2016

Ensemble 2015.  Working on an a way to send NACK'd HL7 messages to a flat file for external review/troubleshooting. (Similar to the way BadMessageHandler deals with validation errors.)

I think I have the Alert piece down, but need assistance with the exact syntax to do an SQL query in the DTL (or a custom function) to pull the HL7 message Raw Content into the Alert, based on the SessionID.

(Also, anything special to write alerts to the File Operation?)

Thanks,  Brian

3
0 976
Question Mike Kadow · Jul 11, 2017

I am working with Caché Relationships.

I know how to iterate through the One side of the relationship and for each One iterate through all the various Manys.

What I have been trying to figure out, is the code (I can put into a Class) that will start at the top of the Manys, iterate down and for each of the Manys, pull the associated One.

I can do this with SQL or Globals, but I want to use only Class type code.

Is that clear? Any help?

6
0 715
Question Rubens Silva · Jul 11, 2017

You might find it useful or not. It depends on what you can imagine it to be used with, like I had to.

Either way, I created a lib that can fetch environment variables from a file or from the OS where Caché is running.

Mostly know as dotenv. Many languages have it, so why not Caché?
The usage is pretty simple:
If you want to use OS env vars exclusively, just use the method:

##class(DotEnv.Parser).FromOS()

Otherwise, if you want to specify a .env file containing your variables to complement the OS ones use the method:

##class(DotEnv.Parser).FromPath("/path/to/file")

Both methods return an %

3
0 540
Question John Matson · Jul 10, 2017

Greetings,

I am working on the first of many triggers which will have identical code upon row insertion or update of a single column.  According to the document I should be able to define a multiple-event trigger using Cache SQL/DDL.

Here is a link to the current CREATE TRIGGER documentation.  Within the description section is the following paragraph:

A single-event trigger is triggered by a specified INSERT, DELETE, or UPDATE operation. A multiple-event trigger is defined to execute when any one of the specified events occurs on the specified table. You can define an INSERT/UPDATE, an UPDA

1
0 1138
Question William Beetge · Jul 10, 2017

Hi all

I require an operation that will get a list of hosts every X minutes and call them, using values from my database.

The only issue is that I can't find any sort of scheduling/ timed event functionality in Ensemble. The documentation isn't particularly helpful so I thought I'd give the community a shot.

Is there any existing functionality in Ensemble that allows for scheduled operation calls?

Thanks

2
0 443
Announcement Evgeny Shvarov · Mar 7, 2017

Hi!

Recently GitHub introduced topics for the projects.

So you can change your InterSystems related projects introducing the  topics to let it be categorized, more visible and searchable. Here is the list of good examples for your projects (some of them are clickable already):

intersystems, intersystems-cache, intersystems-ensemble, intersystems-healthshare, healthshare, intersystems-iknow, iknow, intersystems-deepsee, deepsee, cache-objectscript, csp, intersystems-zen, zen.

If you have any good ideas for topics or already using something, please introduce it here in the comments?

Bet

3
0 705
Announcement Evgeny Shvarov · Jun 30, 2017

Hi, Community!

Hope you have already put in your schedule the visit to InterSystems Global Summit 2017 which will take place on 10-13 of September in remarkable JW Marriott Desert Springs Resort and Spa.

This year we have Experience Lab, The Unconference, and 50 more other sessions, regarding performance, cloud, scalability, FHIR, high availability and other solutions and best practices.

1
0 556
Article Vitaliy Serdtsev · Jul 7, 2017 19m read

Quotes (1NF/2NF/3NF)ru:

Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else). The same value can be atomic or non-atomic depending on the purpose of this value. For example, “4286” can be
  • atomic, if its denotes “a credit card’s PIN code” (if it’s broken down or reshuffled, it is of no use any longer)
  • non-atomic, if it’s just a “sequence of numbers” (the value still makes sense if broken down into several parts or reshuffled)

This article explores the standard methods of increasing the performance of SQL queries involving the following types of fields: string, date, simple list (in the $LB format), "list of <...>" and "array of <...>".

0
0 1203
Question Chris Sprague · Jul 4, 2017

Hello,

I'm currently exploring alternatives to CSP/services and ODBC/Sql Maps for access to Caché. I'm not seeing a library which would interest me, so am considering creating one myself.

Does 'CacheConnection' in C# use RPC of some sort, or a defined protocol to communicate with Caché, or does it do so over telnet with scripted commands? I would assume the former. If so, is this a publicly documented protocol that can be implemented by library developers?

Any guidance in this area would be appreciated.

9
0 889
Question wx fg · Jul 5, 2017

hi

    I restored one database on Server B with EXTSELCT^DBREST command from   backup file (this backup file is taken from Server A).  

When I execute select some rows from one table,  it return error like this, 

the same select sql can return correct data  in server A

But when I select other rows from same table on Server B, it return correct data.

Why? maybe the backup file corrupted?

Thanks

1
0 238
Question CM Wang · Jul 5, 2017

"SELECT  %SYSTEM.SQL_TableExists('table name') "could work as expected under SQL shell,

but for   "CALL %SYSTEM.SQL_TableExists('table name')" does not work (not any error reported, it just show nothing).

Is there any reason why CALL could not be applied to a stored procedure?

Thanks.

7
0 571
Article Stephen De Gabrielle · Jul 5, 2017 2m read

I needed to pass through a file with Ensemble but the operation wasn't writing some filenames as given because the  EnsLib.File.PassthroughOperation 'sanitizes' filenames removing characters that are not valid on some operating
systems;
09000655_AEDC_C3344059_A&#47;E_Martin Browne_09000655_201706221018.pdf
09000655_AEDC_C3344059_A#47E_Martin_Browne_09000655_201706221018.pdf

Oh No! It has stripped out my semicolon and ampersand! I need them! (and they are valid filename characters in windows)

I needed a class that ignores the file name parameter and instead writes the destination file with the same


0
0 1248
Question Svetlana Ilina · Nov 28, 2016

Hello. I am a student from Syktyvakar Forest Institute(Russia). 

I need to make Research : "Databases for working with spatial data
Consider MySQL, PostgreSQL and 1 to choose from". I want to explore Cache with subject library of spatial data.

Help.

Does Someone from the developers write the libraries of spatial data?

3
0 470
Article Maks Atygaev · Dec 11, 2016 4m read

Caché offers a number of methods for going through a collection and doing something with its elements. The easiest method uses a while-loop and lets you fulfill the task in an imperative manner. The developer needs to take care of the iterator, jumping to the next element and checking if the loop is within the collection.


 But is it really what a developer should be concerned with?! A developer should be working on solving the problem at hand – quickly and producing code of the highest quality. It would be great to be able to just take a collection and apply a function to it that will perform t


18
1 1909
Question JAQUELINE KRIEGER · Jul 3, 2017

Hi everybody, 

I have to create a pivot that shows the result comparing the last week of the current date with the last week of the last year in the same month. I tried using the function LAG, but didn´t work.  Works only if I want to compare the months between the two years.  If someone has some idea, i will appreciatte a lot. 

Thanks.

Jaqueline Krieger

4
0 400
Question Marek Bernád · Jul 3, 2017

Good day, I have this issue. I have global like: ^myglobal(varX) = $LB(var1,var2). I need to delete all globals that have variable var1 in that list same without a need to iterate through all globals and checking their value.

Exact example:

- in database exist following:

^myglobal("Marek") = $LB("code2",1400)
^myglobal("Ondrej") = $LB("code1",12)
^myglobal("Nikita") = $LB("code2",32)
^myglobal("Evgeny") = $LB("code1",76)
^myglobal("Maks") = $LB("code2",99)
^myglobal("Eduard") = $LB("code1",14)
Now! How to delete all globals that have in list in the first place value "code2" please? It doesn't hav

3
0 1309
Discussion Mike Kadow · Jul 3, 2017

I know this may sound like sour grapes, but really it is not.

I hear all the exciting things about the up coming InterSystems Conference, and I am sure it is.

But it is way, way out of my price range, and I am sure out of the price range of most of the Cache/MUMPS developers, without company backing.

Just wondering what others think.

4
0 579
Question Marek Bernád · Jul 3, 2017

Good day, I would like to find out the size of Caché ObjectScript variable in order to guarantee that my program will not leak, equally in terminal and Caché globals.  For example how huge number I can store in that variable ? And what happen in Caché when variable will leak ? How is this behavior treated? (how much memory is reserved for common variable?)

Thanks  in advance for your answers.

2
0 760
Article Tirthankar Bachhar · Sep 27, 2016 3m read

How do we generally create an error object of %Status?

Set status=$SYSTEM.Status.Error($$$GeneralError,"Something went wrong")

Now, like $$$GeneralError there are many more macro defined within %occErrors include file by Intersystem which we can use.

i.e.
#define GeneralError                            5001
#define CacheError                               5002
#define NotImplemented                      5003
#define FeatureNotSupported               5014
#define DataMissing                             5022
#define FileCanNotCopy                       5024
#define FileAlreadyExists                      5














6
1 1568