We are creating a package (written in Caché Object Script) that will provide access to an external DB (MySQL). Because applications that use our package will be run from machines with various, potentially unexpected, operating systems, we’d like to establish a connection to the external DB without using DSNs (we’ve heard that setting up DSNs on certain non-Windows machines can be cumbersome and problematic).

0 4
0 1.1K

Today I'm releasing a new EWD 3 module - ewd-feder8.

ewd-feder8 is a federation or integration platform, built as an extension of the EWD 3 ewd-xpress module. So what does it do and what's it for?

It's all about federating and integrating multiple web or REST service end-points.

At its simplest you can use it as a proxy server in front of a remote web service or REST end-point.

2 0
0 392

Let's say that we wish to store the documents sent to us via all of our Customers, and that the documents could be in PDF, spreadsheet, RTF, plain text, Comma-Separated-Values and XML.

It would be hoped that %Stream.Object would be a good choice of property to hold these documents, especially as you would expect %Stream.Object to morph between BINARY (for PDF, spreadsheet, RTF) or CHARACTER (for plain text, CSV, XML) depending on which type of stream was being persisted.

0 3
0 405
Article
· Jul 22, 2016 16m read
Using Regular Expressions in Caché

1.About this article

Just like Caché pattern matching, Regular Expressions can be used in Caché to identify patterns in text data – only with a much higher expressive power. This article provides a brief introduction into Regular Expressions and what you can do with it in Caché. The information provided herein is based on various sources, most notably the book “Mastering Regular Expressions” by Jeffrey Friedl and of course the Caché online documentation. The article is not intended to discuss all the possibilities and details of regular expressions. Please refer to the information sources listed in chapter 5 if you would like to learn more. If you prefer to read off-line you can also download the PDF version of this article.

19 11
6 5.4K

I want to override the Get and Set methods of a class property. The class maps to a pre-existing global. The property is defined like so:

Property Invalid As %Library.Boolean;

with the property mapping to a node like ^GLOBAL(Code,"INVALID")=1
Code is a property in the same class.

The value can be 0 or 1 or the node might not exist. When it doesn't exist I want the value of the SQL field to come out as 0 (false).

2 12
0 1.6K

Hi,

I am new to Cache and I am trying to convert a JSON string (msgdata) that contains a JSON payload to an object to be saved into a Driver. Entity table. I am running into 2 issues and would appreciate any help:

1) It seems that when the 1st element of a list within the payload (Choices) is an empty string, after I call %ConvertJSONToObject, the obj.%data("payload").Choices contains just 1 empty element, removing the next 3 valid values (10,20,30). The same does not happen if I change the input to [10,20,"",30], in this case it works correctly.

0 3
0 973

Hello, guys.

I want to add a class to my project. This class is in UDL format.

I know that there is a method: ##class(%Compiler.UDL.TextServices).SetTextFromStream. The problem is that to use this method I need to know the name of the class (including all packages) in advance. But, a class can have any name(I mean C:/source/AAA/BBB/CCC.cls, but the real name is Sample.Human.cls).

For now I found only one way to get to know the name of a class - just parse the class code and search for a word which is followed by "Class" word. Is there any better way to do that?

1 6
0 378

I have a Zen Mojo application, developed using Bootstrap plugin and using "Explicit Dispatch" with multiple templates.

I have every template representing an specific area of my application (customer, order, logon, application settings, etc.).

Each template has specific code, client side validation and so on related to its areas by using javascript.

0 2
0 297

I have a NewBie Question.

I have been playing around with "Basic CLass Queries."

I have defined a very simple "Basic Class Query." (see below)

However, I cannot find in the I/S documentation how to execute this query.

Any help is appreciated.

0 8
0 2.3K

I have two pages and I am using the push and pop to go and back navigation. When I click the button forward and back in the browser, I can't navigate more between pages.

The following code:

Page 1 - onSelect Method:
var obj = {idExame: VALID, objUsu: ObjUsu};
zenPage.gotoArea ('itemexames', key, key, false);
view.pushDocument (key, obj, key, obj);


Page 2 - onSelectMethod, back:

var documentKey = "PacienteExamesinitial";
var layoutKey = "PacienteExamesinitial";
var area = "pacienteexames";

1 4
0 361
Article
· Jul 18, 2016 15m read
Remote proxy objects via dynamic dispatch

This article created as side effect of preparations to the longer set of articles about simple, but still handy MapReduce implementation in Caché. I was looking for relatively easy way to pass arguments to (potentially) multiple targets via remote calling facilities. And after several attempts I have realized that we do have very powerful mechanism in the Caché ObjectScript which might be of particular help here – dynamic dispatch for methods and properties.

7 7
0 1.1K

Cache tricks

Several years ago, long before Developer Community Portal was launched, I published a series of Caché tricks at one of Czech web sites. In this article, I’m posting translated version of one of them.

Capturing output of someone else’s methods or routines

Suppose you, or someone else created a useful method or routine, that was producing some computation that you’d like to benefit from, but the routine was writing output to process principal device.

You would like to use the data, but you need it not written to a device, but assigned to a variable. And, for any reason, you can’t modify the code. What can you do?

10 4
0 2.6K

Hello,

How to get XML subtree from XPATH.DOMResult object as Stream or CacheString.

Here is my classmethod. My system receives XML message which has nested structures. The requirement is to send one message at a time to the destination. I have created the XPATH document and used EvaluateExpression method and which returns XML.XPATH.Result of type DOM. I am able to read the dom and get value of the element and its text. But I am looking to send back the subtree.

Code:

0 8
0 1.1K

I'm new to Cache and trying to follow the Using Cache Studio PDF. In section 2.4.3(Adding a Zen form) it tells you insert the following code;

<button caption="Save" o select="zenPage.saveRecord();" />

Unfortunately that code fails compilation. If you try and use the tools there is no o select option nor a select or onselect option. I was wondering if anyone has used this PDF before and knows what the correct attribute should be?

0 3
0 135

I am looking for a database management tool I would have expected to find something like on the SMP website

Aim

show current database usage (ie size allocation) by database then table etc and allow continued drill down,

show information as a table, so can then sort by size to find the biggest item easily

also show it graphically

And then have ability to track and trend growth in size over time

identify a normal growth pattern

alert if variation (higher or lower) from normal based on recent trend

0 2
0 1.1K

I have the following problem:

  • There are several classes with method generators, which needs to be compiled during every compilation
  • I have "ckub" qualifiers enabled in studio
  • I don't want to remove "u" qualifier because I need it very much in another namespaces

So how do I force classes with method generators to recompile when "u" qualifier is present?

0 2
0 1.2K
Article
· Jul 14, 2016 1m read
Caché Haiku

Alex Koblov posted today a #CachéHaiku:

Full command names

Make your code more readable

Than compact versions

My haiku:

Caché Globals

Shows you keys to the value

If you $order it

Your variant? ;)

8 19
1 1K