How to Use User Exits
There are two program forms where you can use User Exits: an Open C
API program or a GRIP program. See the GRIP Programming manual for
details on using GRIP. The procedure for using exits is similar for both.
One of the major differences is the use of the asterisk (*) in the environment
variable definition. The asterisk specifies that the variable points to
a GRIP program.
The procedure for writing an Open C API program that makes use of a
User Exit is as follows:
1. Write an Open C API Program that performs the task you desire. You
can write your program in C or Fortran. All user exits are internal Open C
API programs and require UF_initialize() and UF_terminate() just like ufusr
when using other Open C API routines.
2. Define the pointer to the Open C API program. The file pointer is
a file specification to your Open C API program.
3. If a User Exit uses a return value please initialize it to a valid
value. See the return codes in function prototypes declarations .
In the following documents , we describe how to define these file pointers:
environment variables for different operating systems. A description of
how to specify the file specification to your Open C API program is also
included.
The specifications depend on the operating system that you use and the
filing system. For each User Exit, you must define an environment variable
from your operating system. When NX encounters a User Exit, the
system checks for the presence of a particular environment variable that
points to your Open C API program. When the system finds your program
it automatically executes the Open C API program, then returns to NX.