The \Samples\CMExit subdirectory includes a set of sample exit routines. These commented samples show how to use the data areas available for exit routines and provide examples of the type of processing that can be performed using an exit.
Column map exits must be compiled and linked, and must conform to C programming language calling conventions. Sample exit routines included are:
A standard exit routine is called to derive the value for a destination column in a column map. This sample performs two operations on the sample database table OPTIM_CUSTOMERS, as follows:
To reference this sample in a column map, you must specify EXIT PSTEXIT in the source column for the destination column SALESMAN_ID.
A source format exit is typically called to format the source column, for example, for an age function that otherwise would not be supported in a column map.
The sample performs the following operations on the sample database table OPTIM_ORDERS:
To use this sample, you must specify the exit routine as part of the age function in the ORDER_DATE source column of the column map as follows:
AGE(+1W,SC=ORDER_DATE,SRCEXIT=PSTEXIT)
A destination format exit is typically called to format the destination column, for example, for an age function that otherwise would not be supported in a column map.
The sample performs the following operations on the sample database table OPTIM_ORDERS:
To use this sample, you must specify the exit routine as part of the age function in the ORDER_SHIP_DATE source column of the column map as follows:
AGE(1W,SC=ORDER_SHIP_DATE,SF='YY/MM/DD', DSTEXIT=PSTEXIT)