Robert Cemper · Mar 30, 2020 go to post

PARAMETER and DISPLAYLIST are both compiler directives and you can't mix them.

But you may workaround it by writing your own pair of DisplayToLogical /  LogicalToDisplay ClassMethods for this property´.


Parameter Active = 1;
Parameter Inactive =2;
Parameter Production = 3;
Parameter Upkeep 4;
/// DISPLAYLIST = ", Active, Inactive, Production, Upkeep",
Property Status As %String(VALUELIST = ",1,2,3,4") [ Required ];
ClassMethod StatusDisplayToLogical(%val) As %String
{ Quit $case(%val,..#Active:1,..#Inactive:2,..#Production:3,..#Upkeep:4,:""}
ClassMethod StatusLogicalToDisplay(%val) As %String
Quit $case(%val,1:..#Active,2:..#Inactive,3:..#Production,4:..#Upkeep,:""}

 
Robert Cemper · Mar 29, 2020 go to post

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

Robert Cemper · Mar 27, 2020 go to post

it is an IRIS export

 

while for Cache it ooks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">

 

it might be sufficient to change 26 to 25 to make your Caché happy

Robert Cemper · Mar 27, 2020 go to post

You don't have a great chance, but you may dig it down like this

And I assume once seen you get your display faster than this cycles where I had no idea on the subscript structure before

Robert Cemper · Mar 27, 2020 go to post

I don't know of reverse  order

BUT if you have some idea of the last subscript you may enter the starting  subscript.

instead of seeing the whole Global ^CONFIG

just one specific  subscript ^CONFIG("Telnet"

os starting from a specific subscript ^CONFIG("Telnet":

or from:to subscript ^CONFIG("ECP":"Journal"

or just the select subscript level with a closing bracket ^CONFIG("ECP":"Journal")

Basically it is the same behavior  of the ancient (not to say antique) routine ^%G

When it was written traversing a Global in reverse order was not implemented in Caché nor ist'S predecessors.
So no reverse display

It has a help function that tells you it's capabilities  DO HELP^%G

The %G utility displays global nodes. A "?" at the "Global ^" prompt
displays the global directory.
If you enter just the name of a global,
%G displays the entire global. You may also display a portion of the
global at different subscript levels or specific nodes.
 
A complete global reference, such as ^GLO(3,"BED",5) will display
only that particular node. You may specify a subtree, such as
^GLO(3,"BED", to display all descendants of that node. To display
both the node and its descendants, do not end your entry with a
comma or a right parenthesis.
 
You can leave a subscript field empty when you specify the subtree and
the %G utility displays any nodes matching the other subscripts:
^GLO(,"BED") will match any nodes with 'BED' as the second subscript.

 
You can specify a range of subscripts for a particular subscript
level by inserting a colon between the first and last subscript in the
range: ^PT(1,"ACC":"BIRTH"
 

You can use variables and simple expressions in a subscript
specification by assigning a value to the variable before calling %G.
For example SET ID=214 and enter something like ^PT(ID,0).

 
Robert Cemper · Mar 27, 2020 go to post

just use a single liner from terminal for the last 10 lines  or any number you need

s g="^myGlobal("""")" f i=1:1:10  s g=$q(@g,-1,%) q:g=""  w !,g zw %
Robert Cemper · Mar 26, 2020 go to post

Hi Jenna,

my personal experience with binary over HTTP is painful.

I'd suggest using Base64-Encoding (which means ASCII readable Characters only)
The downside is you have to decode it at the receiver side.
But that way it should be foolproof over across all proxy-, web- and other servers in between. 
HTTP was invented when there was EBCDIC for 8 bit and ASCII for 7 bit.  And some transport software hasn't improved since. sad 
 

Robert Cemper · Mar 22, 2020 go to post

why not use a free local mail server for testing?
I personally use the german speaking Hamster. But there are lots of them. Google is your friend

Robert Cemper · Feb 28, 2020 go to post

error -400 means there is an internal error

It might be caused by using object properties as  :context.anyname inside embedded SQL

give it a try and use "simple variables"  as :%myanyname , :%myShipmentTrackingNo 
and fill the context object outside the embedded SQL
as you do with SQLCODE

Robert Cemper · Feb 26, 2020 go to post

I'm surprised you don't see the obvious performance difference of looking for something of distinct length at the beginning of a string
vs. scanning an eventual rather long string for some bytes somewhere eventually including also composed strings as %AB%CD%.

keep in mind: Caché is built for speed, not for the comfort of the average programmer 

Robert Cemper · Feb 24, 2020 go to post

%STARTSWITH relates better to Caché internal structures and is faster in larger scale

Robert Cemper · Feb 1, 2020 go to post

Once the query is running it is not interested in any browser activity.

BUT:
the query is stopped when you fall into the session timeout
and the related process (and any query) is terminated.
SO it not running forever!

Robert Cemper · Jan 31, 2020 go to post

the benefit of the shell is:

you can stop it by <CTRL>+C immediately. But also don't get any output.
so it's rather a KILL than a STOP

Robert Cemper · Jan 31, 2020 go to post

in Caché Terminal you may

set file="c:\dir\filename"
OPEN file:(:("RS":/IOTABLE="UTF8"):0 if $t write "file open ok",!
use file read line
Zw line
ZZDUMP line

;;; see I/O device guide for more details

The name of the io table is really just UTF8 with no hyphen !

So you force translation to internal format.

Robert Cemper · Jan 31, 2020 go to post

So Caché normally should be ok.
Have you tried to read the HEX codes stored. (eg. by http://www.pspad.com/ )

I had the experience that especially with Windows some well-written files
looked bad by false (back)translation in   some cases. 

(Notepad is one of the ugly beasts to stick with 8 bit chars.)

Robert Cemper · Jan 31, 2020 go to post

It looks to me somehow like double encoded. 

Does your installation run as 8bit national (iso latin1) set or as wide char.  unicode PTUW  ?
Mgmt Portal "About" tells you  
 

Robert Cemper · Jan 30, 2020 go to post

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.
 

Robert Cemper · Jan 22, 2020 go to post

Sounds good.
Does this imply to allow more than one accepted Comment / Reply ?