LIB$SIGNAL doesn't output anything itself, per se. On the other hand,
the signal handlers it causes to run might. Redirecting their output
varies per handler. The output from the OpenVMS-supplied default
handler can be sent to a specified file by defining SYS$OUTPUT and/or
SYS$ERROR early enough.
To do this you must write your own exception handler which, when it is
called with an informational or warning message, does whatever you
want it to do. For example, you could use $PUTMSG with an action
routine to write the formatted text to some application-specific file.
Establish this handler in the main program.