Sample column map exits

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:

PSTEXIT.C
Samples of the three types of exit routines - standard, source format, and destination format.
PSTEXIT.dll
Compiled versions of the three sample exit routines.
PSTEXIT.h PSTCMEXIT.h
Required header files.
PSTEXIT.mak
A sample make file.

Sample standard exit

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.

Sample source format exit

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)

Sample destination format exit

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)



Feedback