摘要:
An improved method and system is described for generalized handling of conditions occurring during program execution in a computer system having a multi-language Condition Manager (CM). A general signaling routine having object code for an external entry point suitable for linking to application programs written in any language supporting external calls is used. The signaling routine may be used by programs to eliminate the step of checking return codes from subroutines by coding the subroutine to automatically signal the proper condition to the CM which in conjunction with user defined condition handlers takes proper actions in response to the condition. A general condition token which may be used as a feedback token is defined as a condition identifier, a format code for the condition identifier, a severity code for the condition, a control code for a facility identifier, a facility identifier and an optional handle for instance specific information. The signaling routine and the feedback token are used by subroutines which can optionally provide for passing an address, where a feedback token can be stored. The subroutine signals conditions if the severity of the condition is greater than a threshold or else stores a feedback token at the address.
摘要:
A condition handling method and means capable of handling programs written in a plurality computer programming languages is created by a set of routines which implement the Common Condition Handling (CCH) function. These routines have entry points which are declared as external or entry variables which enables application programs to link to them. The compilers and application programs can then interact with the condition handling process by calling or branching to the entry points in the common condition handling code when the program is executing. Language specific condition handling routines and user condition handlers are invoked using a last-in-first-out (LIFO) queue to associate the handlers with the current stack frame. Any handler may respond to the CCH with one of three types of requests: Resume, Percolate, and Promote. A separate means is provided for registering Exit Handlers and to move the resume cursor.
摘要:
A method for optimizing instruction path lengths in a compilation of COBOL source code with reference to PERFORM statements requires a two-step procedure in which the control transfer relationship among the PERFORM statements and associated procedures is characterized as a vector of attributes, and a second step in which the vectors are interpreted for any given PERFORM statement such that, where indicated, the code of the procedure or simplified linkage code will be substituted for the PERFORM statement.