After upgrading InterSystems IRIS to a new major version, it is important to follow the guidance provided in the General Upgrade Information in the Release Notes. You must also perform the following tasks (if you have not already done so as part of one of the previous procedures in this chapter):
The following tasks may be necessary depending on your environment and the components you use:
How to Compile Namespaces
After an upgrade, you must compile the code in each namespace so that it runs under the new version of InterSystems IRIS. If the compiler detects any errors, you may need to recompile one or more times for the compiler to resolve all dependencies.
After your code compiles successfully, you may want to export any updated classes or routines, in case you need to run the upgrade in any additional environments. Importing these classes or routines during future upgrades allows you to update your code quickly, minimizing downtime.
Compiling Classes
To compile the classes in all namespaces from the Terminal:
do $system.OBJ.CompileAllNamespaces("u")
To compile the classes in a single namespace from the Terminal:
set $namespace = "<namespace>"
do $system.OBJ.CompileAll("u")
Note:
If your namespaces contain mapped classes, include the /mapped qualifier in the call to CompileAllNamespaces() or CompileAll():
do $system.OBJ.CompileAllNamespaces("u /mapped")
do $system.OBJ.CompileAll("u /mapped")
Class compiler version utility
To assist customers in determining which class compiler version a class or classes in a namespace have been compiled with, InterSystems provides two assists
-
Method – $System.OBJ.CompileInfoClass(<classname>)
This method returns the version of the class compiler used to compile this <classname> and the datetime the class was compiled
-
Query – $System.OBJ.CompileInfo(<sortby>)
This query generates a report for the current namespace that includes all classes, the version of the compiler used to compile each one, and the datetime each was compiled. The first argument <sortby> may have the following values:
Compiling Routines
To compile the routines in all namespaces from the Terminal:
do ##Class(%Routine).CompileAllNamespaces()
To compile the routines in a single namespace from the Terminal:
set $namespace = "<namespace>"
do ##Class(%Routine).CompileAll()