Browse Prior Art Database

Unifying Exception Based Error Model With Return Code Architecture

IP.com Disclosure Number: IPCOM000119220D
Original Publication Date: 1991-Jan-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 2 page(s) / 87K

Publishing Venue

IBM

Related People

Babka, JJ: AUTHOR [+4]

Abstract

A method that maps the exception based error reporting model of the AS/400* into the return code based reporting model of the SAA Procedures Language is described.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Unifying Exception Based Error Model With Return Code Architecture

      A method that maps the exception based error reporting
model of the AS/400* into the return code based reporting model of
the SAA Procedures Language is described.

      The method is implemented within the Procedures Language
400/REXX interpreter and consists of two parts:
1.  A generic exception monitor that is part of the REXX interpreter
2.  An AS/400 specific REXX built-in functions that allows the user
to control, to a certain extent, which exceptions are significant

      Because the REXX language is an interpreted language rather
than a compiled language, the REXX interpreter is always active while
a REXX program is running.  Before passing a command to the CL
command environment, the REXX interpreter establishes a generic
exception monitor that will be invoked when any exception comes back
from the CL command environment.  Since the REXX interpreter
automatically monitors for exceptions, the exception signaling
process of the system is not visible to the REXX program.  That is,
the REXX program need not concern itself with how the system signals
errors.  The REXX program only need be concerned with the REXX
definition for indicating errors, namely the return code mechanism.

      Should an escape exception be signaled as the result of an
error in the execution of a CL command, this is an indication to the
REXX interpreter that an error occurred during the execution of the
command.  The REXX interpreter will then place the message ID of the
message associated with the exception in the special variable RC.
Thus, the variable RC will have a non-zero return code set when an
error occurs.  Moreover, the return code will be very specific to the
condition that caused the error.

      In addition, the REXX interpreter will automatically determine
the severity of the error by the escape exception that was signaled.
If the escape is CPF0001 (command failure) or CPF9999 (function
check), the severity will automatically be set to the FAILURE level.
All other escape exceptions will cause the severity level to...