Question Scott Beeson · Feb 12, 2016

In MSSQL I think you can do something like this:

select *
from HS_IHE_ATNA_Repository.COLUMNS
where TABLE_NAME='Aggregation'

 

How can I do this in Cache SQL?

[%msg: < Table 'HS_IHE_ATNA_REPOSITORY.COLUMNS' not found>]

11
1 2418
Article Sylvain Guilbaud · Feb 24, 2016 1m read

C:\data\backup.bat :

C:\InterSystems\Ensemble\bin\cache -s"C:\InterSystems\Ensemble\Mgr" -U%%SYS ##Class(Backup.General).ExternalFreeze() <C:\data\login.scr 

echo %ERRORLEVEL%

rem note that we need to check errorlevel from highest to lowest here....

if errorlevel 5 goto OK

if errorlevel 3 goto FAIL

echo errorlevel returned wrong value

goto END

:OK

echo SYSTEM IS FROZEN

xcopy c:\InterSystems\Ensemble\mgr\ z:\backup\Ensemble /s /e /y /i

echo %ERRORLEVEL%

goto END

:FAIL

echo SYSTEM FREEZE FAILED

:END

rem Now unfreeze the system

C:\InterSystems\Ensemble\bin\cache -s"C:\InterSystems\Ensemble\Mgr" -U%%SYS ##Class(Ba

0
0 1922
Announcement Evgeny Shvarov · Feb 23, 2016

Hi, Community!

There are only six days left to win InterSystems Developer Community MVP prize.

As it was announced in addition to Free Registration on InterSystems Global Summit winner gets 4 nights stay in the Arizona Baltimore, Waldorf Astoria Resort.

We measure contribution to Developer Community on valuable posts and comments and prepared special leaderboard built on InterSystems DeepSee.

By default, it shows all the members. We added the filter to the dashboard to show leaderboard without members who are InterSystems employees.

So here is current leaderboard without InterSystems members:

  

6
0 370
Question Graham Hartley · Feb 23, 2016

Hi,

Does anybody know when Ensemble 2016.1 will be general availability?

We are holding off upgrading, providing the wait won't be too long.

Thanks,

Graham

3
0 413
Article Dmitry Maslennikov · Feb 23, 2016 14m read

Developing an idea with RuleEngine in XData, we could even refuse from editing full class and edit only valuable xml. Sometime ago I have already written an article(in russian) about such possibility, even more, in that article I wrote about compilable JavaScript to Caché. 

Opening File

This possible with %Studio.AbstractDocument. While extending this class, developer should add a Projection.

Projection RegisterExtension As %Projection.StudioDocument(
                                DocumentDescription = "RuleEngine file", 
                                DocumentExtension = "RULE", 
     

2
0 1145
Article Dmitry Maslennikov · Feb 21, 2016 6m read

Some days ago Alberto has written a very interesting article about the usefulness of ObjectGenerators available in Caché.

In this article, Alberto shows an example RuleEngine based on XData, and how it is possible to improve the process of filling such rules. Caché Studio has a Studio Asist for XData; you may have already seen examples of it if you use ZEN or %Installer.Manifest.

We can use the %XGEN.AbstractDocument class for our task. Unfortunately, InterSystems has marked these classes (all of classes in %XGEN, in fact) as for internal use only. With %XGEN, we should not think about parsing X

2
0 1006
Article Evgeny Shvarov · Feb 1, 2016 1m read

Hi, InterSystems Developer Community!

We are working to improve this site to make it comfortable to read, contribute, share and get answers from InterSystems Developer Community!

But while we haven't fixed some UI issues please find in this post some simple answers on how to deal with Developer Community.

How to add post?

Open Communities page, choose desired e.g. Caché and click "Create New Post" button.

How  to subscribe to the post's updates?

To subscribe to post's updates and get them via email click on Favorite link under the post digest.  For example:

How  can I manage post's header ?

Suppose

17
0 554
Article Alberto Fuentes · Feb 19, 2016 3m read

The attached file contains an example of code generation using ObjectGenerators which builds a very simple homemade RuleEngine. 

Code generation is an excellent way of increasing performance moving run-time calculations to compile-time.

We could generate code creating routines or implemeting methods using ObjectGenerators. In this example we are using ObjectGenerators.

Update: Rule Engine is now on GitHub https://github.com/intersystems-ib/cache-iat-ruleengine

A very simple code generated method

For starters, let's begin with a very basic code generated method:

  • We want to implement ConvertToCSV meth

0
0 977
Question Joel Solon · Feb 18, 2016

This morning on the old Caché Google Group, someone posed the following question, which I've decided to answer here, because it's interesting!

Is there a way to iterate ClassMethod's params, and get param's names and values?

The first answer I can come up with is: it's not easy! In any method, you could try to write code like this (where methodName is the name of your method):

    set method = ##class(%Dictionary.MethodDefinition).IDKEYOpen($classname(), methodName)
    set args = method.FormalSpec
    for i=1:1:$length(args, ",") {
        set arg = $piece($piece(args, ",", i), ":", 1)
   
1
1 1939
Question Tiago Ribeiro · Feb 18, 2016

The cache has error messages default, for example , " -139 SQLCODE : Competition impairment on the update: row versions are not the same. "

How i can exchange it for a more friendly to the user's message? I use the CSP.Page and form_save ( ).

What is best practice for this situation?

3
0 1127
Announcement Andreas Schneider · Feb 17, 2016

Caché Monitor is a database\sql tool primarily for InterSystems Caché but can also connect to MS SQL Server, MS Access and more databases. Within Caché Monitors Server Navigator you see all available Namespaces on your Caché Servers. No need to know the name of the Namespace, no need to configure many many JDBC Connections by hand. Just click on the namespace and see all objects like tables, views, classes and more...

There is a beta build available with some new features: A main new feature in this build is called Query Cloud. With this feature you can write SQL Statements across multiple Cach

2
0 2538
Question Rich Taylor · Feb 8, 2016

In preparation for a presentation I need a  real-world LDAP schema that has been customized a bit beyond the basics.   Perferably this would be based on an OpenLDAP system which would make it easier to merge into this presentation. 

If you have such a schema you would be willing to share please respond or contact my directly at Rich.Taylor@InterSystems.com

Thanks in advance.

Rich Taylor

1
0 390
Question Scott Beeson · Feb 16, 2016

Here is my original query:

SELECT EventType, InitiatedAt, COUNT(*) as cnt
FROM HS_IHE_ATNA_Repository.Aggregation
WHERE EventType = 'LOGIN'
AND LocalDateTime > '2016-02-16 11:00:00'
GROUP BY EventType, InitiatedAt

This gives me data like this:

LOGIN %SYSTEM 69918
LOGIN OTHER 39


However, I need to get the data back as two columns with all but the last concatenated and delimited, more like this:

LOGIN;%SYSTEM 69918
LOGIN;OTHER 39

I tried this:

SELECT EventType + ';' + InitiatedAt as k, COUNT(*) as cnt
FROM HS_IHE_ATNA_Repository.Aggregation
WHERE EventType = 'LOGIN'
AND LocalDateT
3
0 7180
Question Steve Pisani · Feb 15, 2016

Hi,

Given a log file with these records representing, hypotethically, the ‘movements’ or changes in residential city, for citizens, like this: 

 ID           CitizenRef           RelocationDate                 City                        Surname
...
 48          1000                       2015-04-01                          Boston                  Smith
 49          1000                       2015-07-01                          Seattle                  Smith
 50          1000                       2015-10-01                          Boston                  Smith
 51          1000                     

8
0 473
Announcement Janine Perkins · Feb 16, 2016

Do you need to build an object-oriented application using Caché? Take this course to learn how to create, retrieve, update and delete objects in Caché.

Caché Objects Introduction

Learn the basics of Caché objects. This course will provide an overview of Caché Classes, Methods, and interaction with the Caché database by creating, saving, loading and deleting objects. The lessons in this course assume that you have some previous object-oriented programming experience. Learn More.

0
0 320
Question Michael Lundberg · Feb 12, 2016

Hi,

We do have a production including a SOAP.OutboundAdapter that make a request to a .NET WCF Service. The response from that service vary in size. When it come to large one, we talk about maybe 8000 records (with 6-8 attributes per record) in xml, the adapter always give a timout. Even if we put a high number of seconds or set -1. After 1 1/2h still nothing get back. It's just standing there and waiting for ever.

Our .NET developer have look at it (on the WCF-service)  and from ther point of view they say that it seems like Ensemle can't handle such big responses.

In .Net it.s possi

2
0 613
Question Scott Beeson · Feb 11, 2016

I'm writing some custom functions for use in a routing rule.  I have a few that are working, but right now I'm trying to use one that has no parameters.  Typically this would be a sub instead of a function, but I'm not familiar enough with Cache to know what I need to do here. 

Here is the code:

Class Custom.MHC.Common.CustomFunctions Extends Ens.Rule.FunctionSet
{
   /// Location and Revision of this file in Perforce (Auto-updating)
   Parameter SrcVer = "$Id$";
   /// Returns the current environment code,
   /// DEVELOPMENT, TEST, LIVE
   ClassMethod getEnvironment() As %String [ Final ]
   {
   

6
0 575
Article Lexi Hayden · Feb 11, 2016 1m read

We heard from a customer who wanted to display a version number as a read-only production setting. During the build on the build server, this version number is added to the Production class. This works fine, and the Version is displayed in the Portal, but the customer wanted to write protect it, so the enduser can’t change it. The customer had defined the setting like this:

Property Version As %String;

Parameter SETTINGS = "Version:Info";

We advised the customer to define SETTINGS like this instead:

Parameter SETTINGS = "Version:Alerting:label"

where label is the control to use a

0
0 477
Question Timothy Leavitt · Feb 9, 2016

Looking at a property defined as follows:

Property SystemTime As %Library.TimeStamp [ SqlComputeCode = {Set {*}=$ZDATETIME($NOW(),3,1,0)}, SqlComputed ];

The documentation talks about using SqlComputed and SqlComputeCode with SqlComputeOnChange (specifying which events will trigger computation), and about using them with the Calculated keyword (so it's always computed). I don't see any specific explanation of the case above, though, when neither SqlComputeOnChange nor Calculated is specified.

From a bit of testing, it seems that the behavior is:

  • Upon SQL insert or first %Save, if no value has bee
4
0 848
Question Scott Beeson · Feb 8, 2016

Given the following code:

start
    set tstVar = "Green"
    do TestIt()
 
TestIt() {
    write tstVar
}

I get <UNDEFINED>start+4^DeploymentTool *tstVar
 

I also tried setting the variable outside the start method but that doesn't work either.  I realize I could pass tstVar to the TestIt() routine but I'm trying to create a couple variables that will be reused repeatedly so that doesn't really work.

11
0 732