IBM Books

Administration Guide


Sample User Exit Programs

A number of sample programs are provided to demonstrate the usage of the user exit function for a different device or software interface. The program listings identify the version of the device support software used.

You may modify or otherwise use these programs in any way you wish. Comments within these sample programs provide technical information for writing your own user exit programs.

The following topics provide information about the sample programs related to your operating system:

Sample User Exit Programs for OS/2

The user exit sample programs for DB2 for OS/2 are found in the instance subdirectory of the \sqllib\samples\rexx directory. The last user exit sample program (dbuexit.CAD) is an exception: it is found in the instance subdirectory of the \sqllib\samples\c directory. The sample you choose to implement should be renamed with the executable file name of db2uexit with an extension of either .cmd or .exe. This renamed file should be placed in the \sqllib\bin directory for use as a user exit program.

While the samples provided are mostly REXX command files, your user exit program can be written in a different programming language. The executable file name must be db2uexit with an extension of either .cmd or .exe.

There are five OS/2 sample programs provided:

Sample User Exit Programs for UNIX-Based Operating Systems

The userexit configuration parameter causes the database manager to call a user exit program for archiving and retrieving logs. There are three IBM-supplied sample user exit programs on UNIX platforms: one for disk, one for tape, and one for ADSM. It is not mandatory that you use these programs. You may choose to create your own user exit programs. The sample programs may provide you with a model or suggestions that you can use when creating your user exit programs. Useful information is found in the header information in each sample program.

While the samples provided are coded in the C language, your user exit program can be written in a different programming language. The user exit program must be an executable file whose name is db2uext2.

There are three UNIX-based operating system sample programs provided:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]