You are here: User Exits > Creating User Exits

Creating User Exits

User exit programs may be written in either MVS Assembler or C languages. Programs must be reentrant and must be created as AMODE=31,RMODE=ANY.

Writing a C DLL

A sample C program (member CSAMP) is included in the SYSFILES PDS to assist you in writing your record manipulation routines and sample JCL (member JCLXITM) is included in the SYSFILES PDS for creating executable load modules.

Your C program must use the same function names as the sample program CSAMP and the parameters passed to the individual functions must be in the same order and of the same type as shown in the sample. The return value from the functions must be either 0, to indicate success or 1 to indicate that an error has occurred. If an error is returned from the either of these functions, the activity in progress is cancelled.

These functions are processed as DLL’s and must reside in a load library that is accessible to the application. The parameters passed to the CSAMP functions are described in detail in the sample C program.

Writing an Assembler program

A sample Assembler program (member ASMSAMP) is included in the SYSFILES PDS. Exit processing follows standard OS/390 linkage conventions. The parameters passed to the ASMSAMP program are described in detail in the sample Assembler program.