Caché

Syndicate content 118 

I am writing a static SOAP response to simply test connectivity. The end users is getting an error "Message: The processing instruction target matching [xX][mM][lL] is not allowed.", which I believe is related to white space. if I observe the response, it looks like there are two blank lines between the header and the body, which I'm guessing is the white space problem. But I can't seem to get rid of it.

Any ideas?

Code:

Last answer 7 July 2016 Last comment 7 July 2016
0   0 1
523

views

0

rating

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?

I know that using the Light C++  binding, we could pass the arrays as std::map<d_string, d_int> and a .Net equivalent of this using Dictionary<string, int> would be just perfect..

Last answer 5 July 2016
0   0 3
0

comments

420

views

0

rating

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

Last comment 4 July 2016
0   0 4
309

views

0

rating

在Aix7.1上安装使用root用户安装cache2016.1.1.107,且在安装过程中创建cacheusr用户;更改操作系统上的cacheusr的umask后,通过数据库修改编译后的文件(如,js,csp等)在小机上查看权限不变(-rwxrw-r--  cacheusr cacheusr test.js)。

目的:通过数据库编译后的文件的other用户有读写权限。

Last answer 3 July 2016 Last comment 1 July 2016
+ 5   0 2
402

views

+ 5

rating

Hello!

In Caché there is a way to print all current variables using write command without arguments:

USER>set Einstein = 1879
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!

Last answer 30 June 2016 Last comment 30 June 2016
+ 2   0 1
863

views

+ 2

rating

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.

Last comment 30 June 2016
0   0 4
0

answers

301

views

0

rating

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, .raw)
        Set lines = $ORDER(raw($CHAR(0)), -1)
        Write class, $JUSTIFY("", 40-$LENGTH(class)), $JUSTIFY(lines, 7), !
        Set count = count + lines
    }
    Write "Total ", $JUSTIFY("",34), $JUSTIFY(count, 7)
}

All classes matching Mask would be displayed.

Use example

Last comment 28 June 2016
+ 1   0 1
223

views

+ 1

rating

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?

 

 

 

 

Last answer 24 June 2016 Last comment 28 June 2016
0   0 0
244

views

0

rating

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?

Last answer 27 June 2016 Last comment 24 June 2016
+ 2   0 1
598

views

+ 2

rating

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/FieldTes...

Bill McCormick

Director of Product Management

Last comment 27 June 2016
0   0 0
260

views

0

rating

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.

The accumulated list of fixes to problems found in the field since build 632 includes the following changes

0   0 2
0

comments

199

views

0

rating

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....

set RunStatus=$System.Status.Error($$$GeneralError,"DXL Testing Run Error")

Class compile fails because the $$$GeneralError is unknown.

Last answer 23 June 2016 Last comment 23 June 2016
0   0 1
335

views

0

rating

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

Last comment 23 June 2016
+ 4   0 2
896

views

+ 4

rating

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/jso

+ 1   0 1
0

comments

2165

views

+ 1

rating

Hi, Community!

Want to share with you one debugging approach from the Russian forum.

Suppose I want to debug the application  and I want it to stop the execution on a particular line.

I add in code this line:

l +d,-d

When I want to start debugging in this line I block d in terminal

USER> l +d

And execute the app.

The app stops on this line and lets me connect to it with Studio debugger.

To release lock I do in terminal

USER> l -d 

And what are your debugging practices?

 

Last comment 22 June 2016
0   0 5
307

views

0

rating

Hi -

I'm trying to rewind a cursor back to the first row after looping part of the way through the implied result set, but I'm not finding a way to make this happen, is there some such iterator variable or directive that I can leverage to accomplish this?

I could code around it by pulling identifiers and/or values into a local array, and then hand code up an iterator over my local results copy, but this feels like a "redesigning of a wheel" approach, and I thought I would check before I start down this path.

Thanks

Last answer 21 June 2016 Last comment 22 June 2016
0   0 1
230

views

0

rating

Job Description
Caché Objects Web Developer


 

An excellent opportunity exists for an enthusiastic Caché Objects full stack web developer to join our rapidly growing company based near Old Street.

The Job

Our customers use our software to manage events, from small meetings to high-profile conferences and shows. The quality of our software is critical to their success, and critical to our business

+ 1   0 1
0

comments

269

views

+ 1

rating

If I wanted to build a web-based dashboard that monitored various HIE transactions where would I start?

Examples of measures would be Provide & Registers by Facility, Patient Views by facility or even PHR related data.

I have a successful POC that uses nodejs, html and SQL but I think it makes more sense to use Intersystems technology all the way around, I just don't know where to begin.

CSP for the web piece I assume?  How would I access the data, for instance all P&R requests on the BUS?  Any other tips or starting points?  Maybe examples of a similar project?

 

We do not have a DeepSee license

Last answer 21 June 2016 Last comment 21 June 2016
0   0 2
252

views

0

rating

Customer is using an ancient MSM based client Workstation for their application and they made a small change to their server code. They introduced property of %Double() and discovered an issue. The MSM workstation is not able to retrieve any property of an object instance that holds value of $double(0). see images illustrating the issue.

I'm posting this to DC intentionally before I eventually send it to WRC so others can comment.

Dan

Image 1 - data

image 2 - UI

Last comment 21 June 2016
0   0 2
0

answers

170

views

0

rating