Question
· May 1

What does S $ZT="^%ETSDK" mean in MUMPS / InterSystems ObjectScript?

Hi all,

I'm reviewing an older Cache routine and came across this line of code: from file ^ZDBKCRON

S $ZT="^%ETSDK"

Error trap

/home/oper/script/cache_db_backup -t        # Daily CacheDB Backup

 produced the following output:

 <NOROUTINE> *%ETSDK
<ERRTRAP>

-----------

From what I understand, this is setting up an error trap, but I'm not entirely clear on how it works, especially in modern InterSystems IRIS environments.

Could someone please help explain:

  1. What exactly does this line do?
  2. Is %ETSDK a standard system routine? I can't find it in our environment.
  3. What is the best practice for error trapping now — should we be using $ETRAP instead of $ZT?
  4. How can I safely replace or modernize this code?

Any guidance is appreciated!

Product version: Caché 2018.1
$ZV: Cache for UNIX (IBM AIX for System Power System-64) 2018.1.4 (Build 505_1)
Discussion (1)2
Log in or sign up to continue

$ZT is the abbreviation for the $ZTRAP system variable.  You learn more about it at https://docs.intersystems.com/iris20251/csp/docbook/Doc.View.cls?KEY=RCO... 

Setting SET $ZTRAP="^%ETSDK" will call a routine name  ^%ETRSDK but I have no idea what the routine is.  Maybe it a special Error Trap routine used at your site.

Executing
    SET $ZTRAP="^%ETN"
in an ObjectScript routine will setup the ^%ETN utility routine  as an error trap routine which will catch an error signal and then dump the process state into the namespace before terminating the process.  Later, executing the DO ^%ERN utility will allow you to examine the various error trap  dumps in a namespace.