First post! In order to somewhat redeem myself for an unnecessary call to support, I've decided to post some classes that I've written to monitor certain metrics inside our Ensemble Live instance (yeah, Kyle, you WERE laughing at me, but it's okay). What the classes do is to run queries and code to get database sizes, status of the mirror, counts of rows in tables such as EnsLib.HL7.Message and Ens.MessageHeader. The data is collected and written to tables and then an email is sent out daily upon completion. I've found this quite useful in keeping an eye on what's going on.
I need to pass an equivalent of .Net Dictionary<string, int> instance from .Net to Caché. In the application, the Caché .Net provider has been used so far, so we came up with passing it as an instance of array of data types. However, the only way to fill the array we are aware of is to use its Add() method which invokes a call to the server instance method of the array for every key-value pair inserted.
Is there any way to fill the array at once - inserting all the pairs in one server call? Alternatively, is their any other .Net (Provider or eXTreme) API we can use for this task?
We have multiple implementations spanning many namespaces and edges. I would like to see if I could identify a single place, perhaps on HSREGISTRY or HSBUS, that I could capture certain events like searches (from all customers) and record transfers (with requester and provider).
The goal is to have a dashboard that would show simple stats such as searches by participant, records shared by participant and records consumed by participant. These are the 3 most important.
I appreciated the feedback on the other question of "how" but now I'm hoping to find the "Where".
Hi,
I'm trying to perform a SELECT with parameters using the EnsLib.SQL.OutboundAdapter. The SELECT returns results but seems to discard the parameters I try to send. I have tried two methods.
First:
Set par(1,"SqlType") = 12
Set sql = "SELECT Cod, Ing, score FROM [bbdd].[dbo].[vw_Test] WHERE MyParam >= '?'"
Set tSC = ..Adapter.ExecuteQueryParmArray(.QueryResultSet,sql,.par)
Second:
Set par(1) = "20160630"
Set par(1,"SqlType") = 12
Set sql = "SELECT Cod, Ing, score FROM [bbdd].[dbo].[vw_Test] WHERE MyParam >= '?'"
Set tSC = .Adapter.
This is a cross-post so remove if i'm breaking a rule, i just wasn't sure if i was posting to the right place. I've been to the globalsdb website and it doesn't look like i'm going to get much help from there.
NewBie's Corner Session 8 Not
Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.
Click on the Caché Cube in your system tray and select Terminal to try out these commands.
NOT operator ('), single quote or apostrophe
The "NOT" operator reverses the truth-value and is intended for numeric operands, however it can be used on alphanumeric operands.
在Aix7.1上安装使用root用户安装cache2016.1.1.107,且在安装过程中创建cacheusr用户;更改操作系统上的cacheusr的umask后,通过数据库修改编译后的文件(如,js,csp等)在小机上查看权限不变(-rwxrw-r-- cacheusr cacheusr test.js)。
目的:通过数据库编译后的文件的other用户有读写权限。
I am trying to write this loop as efficient as possible. The global has over 10 million records.
For
{
Set PIDX=$ORDER(^[Nspace]LAB(PIDX))
Quit:PIDX=""
Set Data=$GET(^[Nspace]LAB(PIDX))
Set BBData=$P(Data,"\",6)
If BBData'=""
{
If BBData'="########"
{
Am I better off not setting the variable BBData and using If $P(Data,"\",6)'=""
Also, is there a better way to write the two If statements in one line so it only continues if it is either "" or ########
I try going to http://www.globalsdb.org not much help there. I'm wanting to use this for a personal project of mine, if needed i can go to GT.M I just haven't used a linux machine in quite some time and i was hoping to hit the ground running. Any help is appreciated.
Hi!
Here is the digest of the most interesting and valuable posts on Developer Community published in June 2016.
Here we go!
News, Events, releases
Update to 2016.1.1 Maintenance Release
2016.2 Field Test Kit 2016.2.0.677.0
Most viewed
What is the best way to serialize object/list/array/etc to string?
Hi,
Is there system wide or cube wide setting can turn off the deepsee query cache, or force query to compute without using cache ?
Many thanks in adavance.
Cheng Cheng
Hello!
In Caché there is a way to print all current variables using write command without arguments:
USER>set Mozart = 1756
USER>write
Einstein=1879
Mozart=1756
But is there a way to get a list of this variables? I am looking for something that would return value like $LB("Einstein", "Mozart") for this case.
Thanks!
I want to show my script which I use for a completion in bash, for ccontrol and csession.
I am trying to calculate a dimension percentage for WFRole on a child cube named MbMRouteHistoryInitiatorObj joined to a parent cube named MbmQaSObj by using a calculated member dimension within MbmQaSObj.
If I use the calculated member dimension value expression of [WFRole].[H1].[WFRole].CurrentMember/ [WFRole].[All WFRole].%ALL in the child cube MbMRouteHistoryInitiatorObj, the percentages work correctly.
I am not able to calculate the same percentage using the value expression [MbmRouteHistoryInitiatorObj].[WFRole].[H1].[WFRole].CurrentMember/ [MbmRouteHistoryInitiatorObj].[WFRole].
Hi, after installed Healthshare 2015.2, all the tables previously correctly listed working with Healtshare 2014.1 are NOT listed anymore. TrakCare tables are not listed in the catalogue, nor by the WinSQL Intellisense.
Does anybody know a trick or have a hint to resume this useful functionality back?
Thanks.
Hello guys,
I've built a simple rule , as follows:

Thing is, in rule 2, the operation succeeds, the message reachs BO HL7, but in rule 1 it does not go through. In rule 1, I have two different conditions, but they are linked by an OR and one of the conditions is simply IF 1=1.
Do you guys have any clue on why rule 1 does not reach BO HL7?
Thanks
I've created a CSP page to take in a base64 value from a <textarea> and decode it. When I run it I get the error . Any ideas?
Error: <ILLEGAL VALUE>zOnPageBODY+28^csp.decode.1
ErrorNo: 5002
Here is my code
<table>
<tr><td><textarea rows="40" cols="200" name="submitstring"></textarea></td></tr>
<tr><td><select name="decodeoption"><option>Decode</option><option>Encode</option></select><input type="submit"/></td></tr>
<tr><td> </td></tr>
<tr><td><h2>Result</h2></td></tr>
<tr><td>
<script language=Cache runat=server>
Set tString = $Get(%request.
Here's a code snippet to calculate the length of a class or a package in lines of code:
ClassMethod ProjectLength(Mask As %String = "%Package%")
{
Set count = 0
Set sql = "SELECT Name "_
"FROM %Dictionary.ClassDefinition "_
"WHERE NOT Name %STARTSWITH '%sqlcq' AND Name LIKE ? AND GeneratedBy IS NULL"
Set rset = ##class(%SQL.Statement).%ExecDirect(, sql, Mask)
While rset.%Next() {
Set class = rset.%Get("Name")
Do ##class(%Compiler.UDL.TextServices).GetTextAsArray(, class, .Hi!
Here is the question in Russian Forum regarding roots extracting.
In Caché ObjectScript we use exponentiation operator (**) to raise an exponent to power. F.e. let's raise 3 to power of 3:
USER> write 3**3 27
And we use the same operator to extract the root.
USER> write 27**(1/3) 2.999999999999999963
And 2.999999999999999963 is not 3, obviously.
How to extract roots properly in Caché ObjectScript?
Long story short, I created some test data, then deleted it. The database (cache.dat) is 67 GB in size (was around 1 GB before tests).
How do I compact that?
In the HL7 Annotations available in the Management Portal, at the message type and message structure levels, there are columns for 'Explicit Usage' and 'Implicit Usage'. In nearly all cases, the values in these two columns match, but at least for message types RAS and RGR, they don't.
What's the meaning of explicit and implicit in the annotations?
Thanks,
Liz
Earlier in this series, we've presented four different demo applications for iKnow, illustrating how its unique bottom-up approach allows users to explore the concepts and context of their unstructured data and then leverage these insights to implement real-world use cases. We started small and simple with core exploration through the Knowledge Portal, then organized our records according to content with the Set Analysis Demo, organized our domain knowledge using the Dictionary Builder Demo and finally build complex rules to extract nontrivial patterns from text with the Rules Builder Demo.
This time, we'll dive into a different area of the iKnow feature set: iFind. Where iKnow's core APIs are all about exploration and leveraging those results programmatically in applications and analytics, iFind is focused specifically on search scenarios in a pure SQL context. We'll be presenting a simple search portal implemented in Zen that showcases iFind's main features.
I have a MySQL server with "posts" table.
I also have a Caché server with "downloadedposts" table.
They are connected from Caché to MySQL via SQL Gateway
I want to keep Caché table synced with MySQL one (MySQL "posts" table is a master copy), so periodically Caché queries MySQL server and downloads data. So far so good, and if a record appears or changes in MySQL table, Caché downloads the changes.
The problem I'm encountering is that sometimes rows would be deleted from MySQL "posts" table.
How do I synchronize deletions?
Steve Glassman is on vacation today so in his place I wanted to announce the availability of a new kit for the 2016.2 Field Test. The kit details are: 2016.2.0.665.0
There is a wide range of changes to the 2016.2 Field Test, 145 of them in total. You can find a complete listing here:
https://wrc.intersystems.com/wrc/WRC.StreamServer.cls?FILE=/wrc/FieldTe…
Bill McCormick
Director of Product Management
I am pleased to announce the next 2016.2 field test kit, 2016.2.0.677.0.
I haven’t sent an update to this thread in a while and it should come as no surprise that there has been quite a lot of development going on since I wrote about build 632. In fact, there have been almost 300 changes covering most areas of the product.
Can anybody share a code looking for 'dead' locks?
It's not trivial to find such locks manually when there are many records in lock table.
I am testing application code and want to simulate error conditions.
I am trying to use the following to define a custom error with a class method.
$SYSTEM.Status.Error($$$GeneralError,"Any text here")
My class method code looks like this....
Class compile fails because the $$$GeneralError is unknown.
TEXT: set RunStatus=$System.
InterSystems is pleased to announce that Caché and Ensemble 2016.1.1 are now available on all supported platforms.
This followup announcement adds all the OpenVMS versions that were excluded in the announcement last week.
In this article I'll describe how to set up web services and/or REST services using EWD 3.
Since EWD 3 is designed to be modular, you can construct the environment that exactly meets your needs, but for much of the time you'll probably find that the pre-built EWD 3 ewd-xpress super-module does most of what you need because it hooks together all the core EWD 3 and other building-blocks you'll need:
- the Node.js web server that pretty much everyone now uses: Express
- Caché (via the ewd-qoper8-cache module, which, in turn, relies on the cache.
As Rob explained in an earlier post, Caché's Node.js interface allows you to create Web Services and REST Services using the very modular EWD 3 framework.
These services by default return a JSON response with Content-Type: application/json and the response body contains the JSON you return using the finished() method, so:
finished({ test: 'test response' });
returns
{ "test": "test response" }
with a HTTP content-type of application/json
For other external services and tools like e.g.


