InterSystems Programming Tools Index
Routines
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Work with routines programmatically (create, compile, get time stamp, export, and so on); configure mappings.
Background Information
You can create routines in Caché ObjectScript, Caché MVBasic, and Caché Basic. For information, see the following books:
You typically create, compile, and export routines in Studio; see Using Caché Studio.
You can define routine mappings so that you can access code in a non-default location; see Configuring Namespaces in the chapter “Configuring Caché” in the Caché System Administration Guide. Typically you do this within the Management Portal.
Available Tools
^$ROUTINE
This structured system variable returns information about routines.
Availability: All namespaces.
%Routine class
Enables you to read, create, manipulate, save, and compile routines. This class provides methods such as the following:
It also provides the following queries:
Availability: All namespaces.
%RoutineIndex class
Index for all the routines in this namespace.
Availability: All namespaces.
%SYSTEM.OBJ class
Includes the following class methods that you can use with routines:
Availability: All namespaces.
Config.MapRoutines class
Enables you to modify and obtain information about the [Map.xxx] section of the CPF file, which defines routine mappings. (Note that you usually perform this configuration via the Management Portal, as noted above.)
The class also provides the List() class query.
The class documentation includes examples and details.
Availability: %SYS namespace.
%Installer.Manifest class and other classes in the %Installer package
Enable you to define and use an installation manifest. Among other tasks, you can configure routine mappings.
Availability: All namespaces.
Reminder
The special variable $SYSTEM is bound to the %SYSTEM package. This means that (for ObjectScript) instead of ##class(%SYSTEM.class).method(), you can use $SYSTEM.class.method().