Exit Routines for Column Maps

When you create a process request to Convert, Create, Insert, Load, or Restore data, you can specify a Table Map that includes one or more Column Maps to derive the appropriate values for destination columns.

(For details on defining Column Maps, refer to Create a Column Map.)

Optim offers several ways to specify a column value in a Column Map. One way is to specify an exit routine as the source; the exit sets values that could not otherwise be defined for destination columns. Another way is to use exit routines to exclude rows from processing. You can use three types of exit routines:

Standard Exit

The Standard Exit routine is called to derive the value for a destination column in a Column Map. This type of exit routine is useful when you want to perform data transformations that are beyond the scope of Column Maps. For example, an exit can change an employee department number for selected rows according to a complex algorithm, or select specific rows to be processed and discard all others.

A standard exit can get a substring segment of a Source LOB column. To insert a new LOB value in a Destination LOB column, an exit can create a file and pass the file name back to the Column Map processor.

Source Format Exit

The Source Format Exit is called to format the source column in an Age Function that would otherwise not be supported in a Column Map. This exit routine examines the source date in a character or integer column and converts it into a date format usable as input to the Age Function.

Destination Format Exit

The Destination Format Exit is called to format the destination column in an Age Function that would otherwise not be supported in a Column Map. This exit routine converts a date into one of four different destination formats. The data type of the destination column determines the format.

Exit in a Column Map

To use an exit routine in a Column Map, you must specify one of the following in the appropriate source column:

Standard Exit
EXIT dllname[(parm[[,]parm]...) ]
Source Format Exit
AGE(SRCEXIT=dllname)
Destination Format Exit
AGE(DSTEXIT=dllname)

The process calls the Column Map exit routine, once for each data row processed and passes a termination call after the last row is processed. Optional parameters specified with a standard exit routine are passed to the exit, and must be string (enclosed in single quotes) or numeric literals (limit 8).