Adopting InterSystems IRIS: from CACHETEMP to IRISTEMP
It seems that everyone who is moving from Caché to IRIS have noticed this small change among other, more noticeable ones. But have you noticed that temporary globals mapping rules have been changed as well?
As to Adoption Guide ("InterSystems IRIS 2019.1 Document Version: 2.42 32 Adoption Guide for Caché & Ensemble customers. C. Application Development"), there are some differences in reserved global names patterns. Here are those that concern IRISTEMP:
Caché / Ensemble | InterSystems IRIS | Comment |
---|---|---|
^CacheTemp* | <none> | You are free to define a preferred global name pattern for temporary globals and map it to IRISTEMP. For compatibility purposes, ^CacheTemp* will continue to be mapped to IRISTEMP automatically. |
But if you take a look at your namespace using some global explorer (e.g., the standard one, available with System Management Portal), you may notice some other globals, e.g. many of them that matches ^IRIS.Temp* pattern. Having been curious to get a full list, I've got it with ^%NSP utility redirecting its output to file:
set x="/tmp/map.txt" open x:("NW"):1 else write "not writable "_x use x do SHOW^%NSP close x <... view locally or download map.txt file from IRIS server ...> set x="/tmp/map.txt" open x:("NW"):1 close x:("D") ; delete the file
Here is an extract from map.txt file that concerns IRISTEMP global mappings only:
Namespace: QMS Default globals location: directory /opt/bases/i-qms-d/ (local) Default % routines location: directory /opt/iris/mgr/ (local) ********************************************************************* Global name/Range Dirset Target directory --------------------------------------------------------------------- [%utility] -> /opt/iris/mgr/iristemp/ *> /opt/iris/mgr/iristemp/ [CacheTemp:CacheTemq)-> /opt/iris/mgr/iristemp/ *> /opt/iris/mgr/iristemp/ [IRIS.Temp:IRIS.Temq)-> /opt/iris/mgr/iristemp/ *> /opt/iris/mgr/iristemp/ [mtemp:mtemq) -> /opt/iris/mgr/iristemp/ *> /opt/iris/mgr/iristemp/ ===================================================================== [<global>] shows redirection scheme for one global; [<global1>:<global2>] shows redirection scheme for a range between 2 globals; a square bracket [] means that left or right margin is inclusive, while a parenthesis means that the margin is exclusive. An empty parenthesis before or after ':', that is (: or :) , means that the redirection scheme is effective from the start of alphabet space, or till its end, respectively A subscript mapping is missing if it is the same as the default mapping of the global. The default mapping of a global is missing if it is the same as the default global dataset. -> implicit *> lock target
So, there are a few additions to "Adoption Guide" table:
Caché / Ensemble | InterSystems IRIS | Comment |
---|---|---|
^%utility | ^%utility |
Used by some CLI utilities. |
<none> | ^IRIS.Temp* | Used by IRIS internally. Avoiding such names for application globals seems to be a reasonable precaution. |
^mtemp* | ^mtemp* | Seems to be still in use by IRIS SQL, while they were mentioned as legacy many years ago. ^mtempSomeLegacyAppCode* can be in use as well. |
Hope this help somebody on the way to InterSystems IRIS.
Merry Christmas and Happy New Year everyone!