#include <lclib.h> void abend(int code);
abend
terminates program execution using the ABEND macro. The
code
argument is used as a user ABEND code. If code
is
not between 0 and 4095, the actual ABEND code is unpredictable. Open
files are not closed, and atexit
routines are not called before
termination.
The SIGABRT signal is raised before termination occurs. Program
execution continues if the signal handler exits using longjmp
.
If SIGABRT is managed by OpenEdition software rather than by SAS/C software,
the program's final termination status is "terminated by SIGABRT."
Also, the ABEND code is not directly accessible to a program running
under the shell.
abend
.
abend
without closing files, data in the
files may be lost. In addition, an open UNIX style output file that
requires copying is unchanged if you call abend
. (See
I/O Functions for more information on UNIX style files.)
#include <lclib.h> #include <stdio.h> void fatal(int errcode) { /* Terminate execution after fatal error. */ fprintf(stderr, "Fatal error %d, terminating.n", errcode); fclose(stderr); fclose(stdout); /* Close standard files before ABEND. */ abend(errcode); }
abort
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.