I need to dynamically create a class based on a parameter passed into a class method. Basically the method takes in a string that contains the name of the class I need to create a new instance of.

I need something along these lines.

ClassMethod someMethod(className As %String)
	set classObject = ##class(className).%New()


Trying to do this right results in a class not found error because it seems to be treating the variable as a literal string.

0 3
0 991

I downloaded and installed the trial version of Caché.
it is installed in c:\intersystems\Trycache
I changed the system environment settings so that
GLOBALS_PATH = c:\intersystems\Trycache
and PATH includes c:\intersystems\Trycache\bin
Caché works, and I can login, use the globals, etc...

0 1
0 320

I can directly order over a MultiDimensional property, e.g.

set key=$order(obj.prop(key))

However I have a generic method that has to use the $property method, if I know the keys then I can just fetch a value with...

set value=$property(obj,"prop","key")

But if I don't know the keys then I am not aware of a solution to do this, e.g.

set key=$order($property(obj,"prop",key))

will not work.

0 6
0 455
· Feb 19, 2016 1m read
Simple WorkMgr example

Attached code contains a very basic $system.WorkMgr example.

It uses several jobs (workers) to update different chunks of rows of a table.


  • Creates a table with 100 records.
  • Split table in chunks
  • Initialize WorkMgr and queue chunks to workers.
    • Every worker simply sets its process number in the Job field of the processed row.

In this case, I have tested the example in a 8-core laptop:

1 1
0 817


I would like to know if anyone has had some experience in building systems for multiple end-users.

To keep things simple, in a hypothetical example, say an Event Booking System, where a Venue could sign up to use such a system and define it's Venue, costs, calendars, etc.. and then invite their customers to book the Venue on different days/times.

If I wish to offer such a system to many Venues, there are a number of options available.

0 6
0 1.9K

Hi all,

We are moving to IRIS our productions, and everything seems to go fine. But we are facing a problem because we are using the object %Library. CacheObject in some classes, and IRIS doesn't seem to recognize it. At the IRIS documentation (https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls) the object is effectively removed, and I can't find the equivalent.

Has anyone faced this? Which is the new object in IRIS?

0 3
0 370
· Oct 18, 2018
$match or "?"

Hello all...

Is there two matching patterns in Caché, is there a difference in use one or the other?

USER>set a = "(1234)"

Using $match.

USER>w $match(a,"\([0-9]{4}\)")


Using literal match (sorry if not correctly term expression)

USER>W a?1"("4n1")"


What is different from using one or the other?

The 'a?1"("4n1")"' does this pattern exist only Caché.
Exists performance improvement with use pattern Caché?

0 2
0 553

Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to a %DynamicObject. On the other hand, when a serialized JSON data comes in, it can be easily deserialized into dynamic object and subsequently bound to regular class by the newly created adapter.

13 7
1 2K

I think I already know the answer to this but I thought I'd ask anyway. So the Node.js adapter allows you to perform operations directly on Globals. Does the InterSystems.Data.CacheClient.dll or InterSystems.CacheExtreme.dll provide a mechanism to access Gobals directly or are you accessing globals via Caché ObjectScript classes?

0 5
0 529

Hello, our Team is trying to develop Ensemble DTL to transform incoming X12 files into persistent data records. We created a persistent class and we can insert data using SQL. We tried to verify that %Save() gets called by adding %AddToSaveSet() method to persistent class and there writing to a global. We had to extend our persistent class with Ens.VDoc.Interface class or we could not see %Save() being called from Ensemble DTL. We suspect that %Save() gets some kind of error. We tried to debug by overwriting Transform() method in our DTL class.

0 3
0 756

Hi All,

I need some help with sending PDF files to printer using cache instead of using third party tools(Adobe, foxit reader, etc..).
Sometime i getting access issue with the exe files.

Can able to send text data to printer using below code.

Set Dev="|PRN|PrinterName"
USE Dev Write "Test printing",!

Any suggestions on sending PDF to printer?

0 3
0 872


Can we create a new class in the studio using any command rather then using the Menu Item Option from Menu Bar in Studio .

Requirement : Create/Draft a new class and able to extends the other classes using a command in Cache Class .

In other words , I want to Dig in the Menu Item class from which Menu bar is created in studio and option are provided Like New..., Open..., etc



2 1
0 241
· Oct 9, 2018
SID Conversion

Hi all,By using LDAP cache method ##Class(%SYS.LDAP).GetValuesLen(LD,CurrentEntry,Attribute) we get the list of attributes but in "ObjectSid" attribute have the SID in binary format(objectSid^U¤:c@ãºþÕLCP]). how to convert to the readable format from the binary format in cache side.
Please help us to proceed further

0 3
0 351

Using our cool new debugging extension for Visual Studio Code I'm trying to debug a CreateProjection method of a class, but when I compile it the work apparently gets done in one of the worker jobs, so my breakpoint never triggers.

Is there a compiler flag or qualifier to force the compilation to be done in-process rather than getting handed off to a worker job?

2 4
0 451

You have a global ^CODE("TNO","BIO",291,"AKI") that may or may not exist. On the data side of the global ref it can have a boolean value of 0 (false) or 1 (true) and this global is wrapped up in a Caché class accessible from myobject.AKI property. At the object level, how do you check whether the property is defined ie. is there a $DATA equivalent for Cache Object properties? Also, how would you kill /null the property as opposed to making the value 0 (false) or an empty string?

0 10
0 3.4K

Hi everyone,

I need submit a object have a json string as property of class, but I get an issue, object can't save to SQL table if I take json data to json property. I try making a test class with only json property and get the same issue, no data row in SQL table after run ClassMethod . Some one know what's problem, please help me. Here my test class:

1 2
0 753