What Object Script command can write KILLdes journal records?

I'm working on a task where I need to apply journal file records to another database. I can't use Journal.Restore class methods as I need to perform some data transformation, therefore I'm reading journal file record by record using %SYS.Journal.Record API.  

It seems that there are only few journal records that I need to process, namely:

Type TypeName
6    SET
7    KILL
8    KILLdes
9    ZKILL
10   RemoteSET
11   RemoteKILL
12   RemoteZKILL
14   BitSET

No problem, while I'm just curious: which COS command could provide KILLdes record? I've met it only once in the context like this:

KILLdes ^SYS("Task","TaskD",1006,"EmailOnError",1)

I can't imagine that Caché is smart enough to recognize the command series:

set tmp=^SYS("Task","TaskD",1006,"EmailOnError",1)
kill ^SYS("Task","TaskD",1006,"EmailOnError",1)
set ^SYS("Task","TaskD",1006,"EmailOnError",1)=tmp

as one `KILLdes ^SYS("Task","TaskD",1006,"EmailOnError",1)` action.

It should be a command or an intrinsic function to perform it as a single statement; does anybody know it?

  • 0
  • 0
  • 155
  • 2
  • 2

Answers

KILLdes is a record for kill of descendents journaled as part of a higher-level kill inside of transaction.
So it's a Kill command.

Thank you, Ed.

So it seems that I can ignore records of this type as processing of KILL record of the top node would be enough.

KILLdes only happens during transaction, so, it will be able to revert changes.

And it happens when you kill some node with existing subnodes. So, it will kill each subnode separately with KILLdes