C signal representation of S/370 exceptions

S/370 exceptions and abends are mapped to C signals. Therefore, if both of the following condition are true, you can apply C signal handling functions to S/370 exceptions and abends:
  • You have set the TRAP(ON,SPIE) or the TRAP(ON,NOSPIE) runtime option (Language Environment condition handling is enabled)
  • You do not request in the assembler user exit or in the ABPERC runtime option that any of the abends be percolated (ABPERC(NONE))
Following are the C signal representations for the following exceptions.
  • For S/370 exceptions generated by the hardware or math library, see Table 1. Some of the exceptions listed in the table can be masked off for normal Language Environment execution.
  • For abends, see Table 2.
Table 1. Mapping of S/370 exceptions to C signals
Interrupt code Interrupt code description C signal type
01 Operation exception SIGILL
02 Privileged-operation exception SIGILL
03 Execution exception SIGILL
04 Protection exception SIGSEGV
05 Addressing exception SIGSEGV
06 Specification exception SIGILL
07 Data exception SIGFPE
08 Fixed-point overflow exception n/a
09 Fixed-point divide exception SIGFPE
10 Decimal-overflow exception SIGFPE
11 Decimal-divide exception SIGFPE
12 Exponent-overflow exception SIGFPE
13 Exponent-underflow exception n/a
14 Significance exception n/a
15 Floating-point divide exception SIGFPE

Table 2 lists the C signal type for abends that can occur under Language Environment.

Table 2. Mapping of abend signals to C signals
Message Abend Description C Signal Type
CEE3250 User-initiated abends (SVC 13) SIGABND
CEE3250 MVS(VSAM or others)-initiated abends SIGABND
No message delivered Language Environment abends for severity 4 errors (U40xx) n/a
No message delivered Language Environment-initiated abends n/a