If I understand you correct you expect something  like

INSERT INTO new.MESSAGE (SELECT * from  EnsLib.HL7.Message  where id = ? )

this may work for rather modest designed relational tables but I doubt it will work for some complex structure as EnsLib.HL7.Message .

Subclassing is not the way to solve your problem for 2 reasons:

  • A subclass has always to match the .IsA() class type of its parent    (e.g. Employee as subclass of Person. Employee is also always a Person)
  • SubClasses share the storage with its parent. There are dirty tricks to avoid this but I assume you do not intend to change  EnsLib.HL7.Message.

There are ways to do something like this if you fiddle around in the storage structures. 
BUT: for reasons of transparency, documentation, and maintainability
I'd strongly recommend to use DTL. 


Fiddling around with COS in Ensemble is a rather tricky exercise.
Based on practical experience I can confirm that your successors will never forget you.

Hi Jenna,

I took some time to verify my suspicion.  (Caché 18.1)

You depend on the type of stream that is used in your object

#A)  %Library.GlobalBinaryStream or %Library.GlobalCharacterStream

  • if you have no stream yet you run do obj.MyStream.Write("whatever") then your stream will land in ^SSA.DocumentCacheS as expected
  • but if you get an already existing external stream and set obj.MyStream = myStreamOref then just the oref / OID of the stream is set including ^CacheStream.

Which seems to be your case   sadcrying​​​​​​​  angry
it's not a big surprise as ENSEMBLE may still use the old style. 

#B) using %Stream.GlobalBinary, ...

  • Both cases ended as expected with the stream in ^SSA.DocumentCacheS It seems to me that a CopyFromStream happens during the assignment. I'd name it expected behavior.   smiley

Hi Nigel,
About a year ago a faced a similar problem and found 2 possible workarounds.

Instead of writing a WS client a delegated it out to JavaScript.
#1)  Using CSP
#2) my preferred one with node.js
Both examples are available on OpenExchange 

Client for WebSockets based on CSP

Client for WebSockets based on Node.js

as Websockets ar so natural to JavaScript the result is no rocket science.

Stay healthy 

@Julius Kavay is fully correct.

The compiler was first written ~10 years before the idea of LLVM started  @ University of  Illinois.
Various interfaces allow your development very close to the data store. 

I'd suggest you contact your Sales Engineer @ InterSystems (Darmstadt ?) for disclosure of internals. 
 

Assuming that cdate has  a rather narrow selectivity

#1) looking for a distinct value (1)  gives a rather moderate result set. So the index global might not consume too much buffer blocks.

#2) looking for >1  (combined with a  significant EXTENTSIZE may create a huge resultset.
So it is wise to scan the index global first {typically less blocks than data global] and keep the hits sorted by ID.
Then you run with this hit list along  the master map through your data global. Assuming that data require 
significantly more block reads than the index global.

With a reasonable amount of Global buffers, your temp Global even might not see the Disk storage at all. 

You see it's a bunch of assumptions hidden in this query plan.
The main goal, in any case, is to have as less "disk" access as possible.
I quoted "disk" as storage has so many kinds of variations that it just stands as a synonym.
 

Hi Dmitriy,

$ZF(-1) has no chance for a timeout it is strictly synchronous

So $ZF(-2) and Looping for a result might be a workaround
$ZF(-100,"/ASYNC", ...) may do the same. See details

Both need to run the external routine in a script that documents its completion in some file and you check it.

A different approach could be a Command Pipe (CPIPE) where you read the result with a timed READ.
It's basically the same

Hi Scott!

Happy new year! 
You are right ZEN is out but CSP is not.
With ZEN you might have implemented inline editing.
But is rather simpler to achieve an acceptable result  (except coloring) if you separate editing from table view.

The generated page has a SEARCH page that should be easy to configure. <CSP:SEARCH>
And if you force the generated page to start with the search page with maxrows=25 you might cover the needs I understood.

This were my changes:
<head>
<title>Cache Server Page - Sample.Person (SAMPLES)</title>
</head>
<!-- start with search page -->
<body onload='form_search()'>
<h1 align='center'>

and at end:
</form>
</body>

This is the extended CSP:SEARCH tag:

<!-- use csp:search tag to create a javascript function to invoke a search page -->
<csp:search name='form_search' 
 classname='Sample.Person' 
 where='ID,Name,DOB,Home.City,Home.State' options='clearbtn,sortbox' 
 PREDICATES="%startswith,=,contains" MAXROWS=25
 SELECT = 'ID,Name,DOB,Home.City,Home.State,Home.Street,Home.Zip' 
 >

I did the example in namespace SAMPLES