SRW.USER_EXIT



Description  This procedure calls the user exit named in user_exit_string.  It is useful when you want to pass control to a 3GL program during a report's execution.

Syntax           SRW.USER_EXIT (user_exit_string CHAR);

Parameters
user_exit_string        Is the name of the user exit you want to call and any columns or parameters that you want to pass to the user exit program.

Restrictions
User exits are not portable.  If your report must be portable, and you need to add conditional logic to it, use PL/SQL.

If the user exit string passes a column or parameter to the user exit program, SRW.REFERENCE 
must be called before this procedure.

Example
/* Suppose you have a user exit named STORE to which you want ** to pass salary values from Report Builder.  To do so, you ** could write the following formula.  For more information on ** how to call user exits, see Calling a user exit. */
FUNCTION FOO RETURN BOOLEAN IS
BEGIN
IF :SAL >= 0 THEN
   SRW.REFERENCE(:SAL);
   SRW.USER_EXIT('STORE SAL');
ELSE
   SRW.MESSAGE(100, 'FOUND A NEGATIVE SALARY. CHECK THE
          EMP TABLE.');
END IF;
EXCEPTION
    WHEN SRW.UNKNOWN_USER_EXIT THEN
         SRW.MESSAGE(200, 'STORE USER EXIT WAS UNKNOWN.
                     CHECK IF IT''S LINKED.');
    WHEN SRW.USER_EXIT_FAILURE THEN
         SRW.MESSAGE(200, 'STORE USER EXIT FAILED.
                     CHECK ITS CODE.');
RETURN(TRUE);
END;