Robert Cemper · Oct 4, 2018 go to post

You hit the point %Boolean s an excellent example  it can be TRUE, FALSe or NULL
in Caché terms: 1, 0, ""

Your example ^CODE("TNO","BIO",291,"AKI"))  is partially misleading in that sense that a global subscript can NEVER be ""
while the content of $LB() can be $LB(1,2,"",4)  or $lb(1,2,,4)  here you find your  "undefined" again,
similar to NULL in SQL (which is a different story)

Robert Cemper · Oct 4, 2018 go to post

there is a major difference between 1) and 2)

1) is also true if you have SET ^CODE("TNO","BIO",291,"AKI"))=""

Robert Cemper · Oct 3, 2018 go to post

You could also use a Command Pipe (docs) and read directly from your OS using "../bin ccontrol  list"  or similar

You just do the usual OPEN + USE and READ whatever comes back.

Robert Cemper · Oct 3, 2018 go to post

Check performance log and activity on your ESX or whatever your VM is running on. 
It looks like a performance problem of the virtual disk.

Robert Cemper · Oct 3, 2018 go to post

this information is stored in ^|"%SYS"|SYS("Security","ApplicationsD")

you could extract it by MERGE ^mySAVE=^|"%SYS"|SYS("Security","ApplicationsD")
and then do any export of the global

Robert Cemper · Oct 1, 2018 go to post

Thanks!
One headache less in the discussion about the "right" way to write code.
+a tiny piece for "creative freedom".  wink 

yes

Robert Cemper · Sep 28, 2018 go to post

Procedureblock =1 

means ALL local variables except call parameters and %variables move to stack
and return when you return from your method (=procedure)

see Summary on Local Variable Scoping  for more 

this memory operation is not free but nothing to get a headache upon

Robert Cemper · Sep 28, 2018 go to post

Of course, if your utility classes are all ABSTRACT it is pure code.  As any .MAC, just easier to read.
OREF is just a special data type (object pointer) and not better or worse than any other variable.

I 'd guess variable scoping and procedure block has much more (microscopic) influence on performance.

My personal preference is to have only code tightly related to stored date in "object"-classes.
Anything else outside that is not only related to this class.

Robert Cemper · Sep 23, 2018 go to post

As IClassID seems to be numeric, did you try to force a pure numeric comparison ?

eg.  if +lClassID '= +rs.GetData(5) {

or if (lClassID - rs.GetData(5)) {

Robert Cemper · Sep 21, 2018 go to post

I use * X for linuX aiX uniX solaris and similar real OS.

on Win* you just have to click on start caché in the cube

Robert Cemper · Sep 21, 2018 go to post

In namespace %SYS there is the utility JRNDUMP that you may take as template

from terminal run DO ^JRNDUMP and see the content

It is 800 lines hardcore COS.
I wouldn't recommend it as you might not get what you are looking for if you aren't a very experienced COS system developer. 
 

Robert Cemper · Sep 21, 2018 go to post

Sorry Kevin,
I concentrated on CPIPE.

my code was Written for a FOR p=1:1:254 loop to find unused IP addresses in a specific subnet.

in your case, ping might be something like  set ping= "ipconfig"

Robert Cemper · Sep 21, 2018 go to post

if it's grey your local instance on Windows is not started.
There is no cube on *X as far as I know

Robert Cemper · Sep 20, 2018 go to post

Journal is definitely a valuable source.
BUT: It documents Global changes. It doesn't know about objects nor rows in tables.

Robert Cemper · Sep 20, 2018 go to post

Kevin

You can also use a Command Pipe (docs) and read directly from your OS using IPconfig  (on Windows) or ifconfig (in Linux/ Unix)

You just do the usual OPEN + USE and READ whatever comes back.

As an example a handcrafted ping routine

zping ;
 k empty
 s pipe="|CPIPE|"
 close pipe
 s ping="ping 10.10.12."_p
 open pipe:(ping):10 w $t," ",p,!
 for  {
 use pipe read line
 use 0
 set empty=$s($l(line):0,1:$i(empty)) q:empty>3
 write:empty<2 line,!
 }
Robert Cemper · Sep 20, 2018 go to post

you see the local installation.

You have to set your preferred instance to your mac installation.
(have no mac and no idea how your virtual box talks outside)

Robert Cemper · Sep 20, 2018 go to post

with ^OBJ.DSTIME you get the registered changes.
It is up to you to process it and to generate whatever format or style you prefer when and how often you like

So it's nothing ready and YOU have to write some code and manage it. 

DeepSee does nothing for you.

Robert Cemper · Sep 20, 2018 go to post

According to your explanation - the feature you are looking for is available in Caché

For the use with DeepSee there was a class parameter introduced to allow synchronization  of tables.

DSTIME = 1 creates a log in ^OBJ.DSTIME to trace INSERT, UPDATE and DELETE of rows / objects.
see the general description and details on ^OBJ.DSTIME

Robert Cemper · Sep 19, 2018 go to post

This is a design feature.

Ensemble was designed to work on a worldwide base independent of time zones, daylight saving nonsense and other local time deviations with a consistent monotone growing sequence of time.
So the use of UTC is spread everywhere across the code and there is just no single place to switch it on or off.

So if you want to see logs and other info in local time your only chance is to rewrite the pages or to modify the original code in ENSLIB without any guaranty for eventual unexpected side effects.

My personal opinion: It's not worth the effort.

Robert Cemper · Sep 17, 2018 go to post

eXecute command is sensible to variable scoping
in addition control of allowed operates is required.
this small method gives you an easy to maintain code.

ClassMethod Operate(var1 = ""op As %String = "",var2 = "") As %Boolean {
 goto $case(op
         ,"<":lt
         ,">":gt
         ,"=":eq
         ,"<>":ne
         ,:fail
         )
fail quit 0
lt   quit var1 < var2
gt   quit var1 > var2
eq   quit var1 = var2
ne   quit (var1 '= var2)
}

.

and you are free to use any naming of your operator you allow ( & , $ , @, GOOFY, DAISY, DUFFY, DONALD, .. )

Robert Cemper · Sep 17, 2018 go to post

Assuming you create your Output by WRITE variable
the most simple solution would be to change it to   WRITE """"_variable_""""

if your variable can contain quotes that need to be escaped WRITE """"_$REPLACE(variable,"""","""""")_""""
may fit your needs.

More sophisticated you may hide the quoting in some macro definition.

Robert Cemper · Aug 29, 2018 go to post

That's it,  Alex is right

USER>set list=$lb(7,8 ,9)
USER>zzdump list
 
0000: 03 04 07 03 04 08 03 04 09                              .........
USER>set $li(list,2,2)=$lb()
USER>zzdump list
 
0000: 03 04 07 01 03 04 09                                    .......
USER>zw list
list=$lb(7,,9)