TRAP
- Default
- ON,SPIE
- Recommended
- ON,SPIE
- Considerations
- The TRAP option allows LE to intercept an abnormal termination
(abend), provide the abend information, and then terminate the LE
runtime environment.
TRAP(ON) also assures that all files are closed when an abend is encountered and is required for proper handling of the ON SIZE ERROR clause of arithmetic statements for overflow conditions. In addition, LE uses condition handling internally and requires TRAP(ON). TRAP(OFF) prevents LE from intercepting the abend. In general, there will not be any significant impact on the performance of a COBOL application when using TRAP(ON).
When using the SPIE suboption, LE will issue an ESPIE to handle program interrupts. When using the NOSPIE suboption, LE will handle program interrupts via an ESTAE.
Performance considerations using TRAP: On the average, TRAP(ON) was equivalent to TRAP(OFF).
related tasks
Closing QSAM files (Enterprise COBOL for z/OS® Programming Guide)
Closing VSAM files (Enterprise COBOL for z/OS Programming Guide)
Closing line-sequential files (Enterprise COBOL for z/OS Programming Guide)
Handling errors in arithmetic operations (Enterprise COBOL for z/OS Programming Guide)
Closing QSAM files (Enterprise COBOL for z/OS® Programming Guide)
Closing VSAM files (Enterprise COBOL for z/OS Programming Guide)
Closing line-sequential files (Enterprise COBOL for z/OS Programming Guide)
Handling errors in arithmetic operations (Enterprise COBOL for z/OS Programming Guide)
related references
Language Environment® runtime options (Enterprise COBOL for z/OS Migration Guide)
TRAP effects on the condition handling process (z/OS Language Environment Programming Guide)
TRAP runtime option and user-written condition handlers (z/OS Language Environment Programming Guide)
TRAP runtime option and CEEBXITA (z/OS Language Environment Programming Guide)
TRAP (z/OS Language Environment Programming Reference)
TRAP (z/OS Language Environment Customization)
Language Environment® runtime options (Enterprise COBOL for z/OS Migration Guide)
TRAP effects on the condition handling process (z/OS Language Environment Programming Guide)
TRAP runtime option and user-written condition handlers (z/OS Language Environment Programming Guide)
TRAP runtime option and CEEBXITA (z/OS Language Environment Programming Guide)
TRAP (z/OS Language Environment Programming Reference)
TRAP (z/OS Language Environment Customization)