Skip to main content

Mapping a Routine

Mapping a Routine

When you map a routine to database ABC, you configure a given namespace so that Caché finds this routine in the database ABC, which is not the default database for your namespace. When you define this routine mapping, Caché does not move the routine (if it already exists) to the designated database; instead the mapping instructs Caché where to find the routine in the future.

To map a routine:

  1. If the routine already exists, move it to the desired database as described in “Moving Code from One Database to Another,” later in this chapter.

  2. Access the Management Portal.

  3. Select System Administration > Configuration > System Configurations > Namespaces.

  4. Select Routine Mappings in the row for the namespace in which you want to define this mapping.

  5. Select New Routine Mapping.

  6. For Routine database location, select the database that should store this routine.

  7. Enter a value for Routine name. You can use the * character to choose multiple routines.

    Use the actual routine name; that is, do not include a caret (^) at the start.

    The routine does not have to exist when you map it (that is, it can be the name of a routine you plan to create).

  8. Select the Routine type.

  9. Select OK.

  10. Select OK.

  11. To save the mappings, select Save Changes.

For more information, see the Caché System Administration Guide.

You can also define this kind of mapping programmatically. You can also define routine mappings programmatically; see the “Routines” entry in the InterSystems Programming Tools Index.

Important:

When you map one or more routines, be sure to identify all the code and data needed by those routines, and ensure that all that code and data is available in all the target namespaces. The mapped routines could depend on the following items:

  • Include files

  • Other routines

  • Classes

  • Tables

  • Globals

Use additional routine, package, and global mappings as needed to ensure that these items are available in the target namespaces.

FeedbackOpens in a new tab