HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 2 Intrinsic Use

Error Handling

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Three types of errors can occur when an intrinsic is executed:

  • Condition code errors. Such errors are generally recoverable since control returns to the calling program. The operating system maintains condition codes to provide backward compatibility with previous (MPE V/E-based) operating systems.

  • Status parameter errors. When you include the status parameter in the intrinsic call, it returns status information to the calling routine. For some intrinsics, both the condition code and the special status parameter can return information; other intrinsics use only one of these to return information.

  • Abort errors. Such errors occur when a calling program passes illegal parameters to an intrinsic or does not have the required capability for the intrinsic. An abort error terminates the process.

Condition Code Errors

Some intrinsics have an associated condition code. A condition code is a temporary value providing information about what happened during execution. The condition code is affected by many intrinsics and should be checked immediately upon return from an intrinsic.

A condition code has three possible values (CCG, CCL, or CCE) and has the general meaning as indicated in Table 2-3 “Condition Code Descriptions”. Specific meanings are listed under the individual intrinsic called.

Table 2-3 Condition Code Descriptions

ValueCondition CodeDescription
0CCG (>)Condition Code Greater Than. A warning or special condition occurred but may not have affected the execution of the request. (For example, the request was executed, but default values were assumed as intrinsic call parameters.)
1CCL (<)Condition Code Less Than. The request was not granted, but the error condition may be recoverable.
2CCE (=)Condition Code Equal. Generally indicates that the request was granted.

 

Status Parameter Errors

Some intrinsics use the status parameter to return information on the status of the intrinsic call. This parameter is a native mode (NM) implementation of the condition code feature with extended capabilities. The status parameter is a 32-bit signed integer value passed by reference.

NOTE: It is good programming practice to specify the status parameter and check its value after an intrinsic call. If an error or warning condition is encountered and the status parameter was not specified, the intrinsic causes the calling process to abort.

The status parameter is read in two 16-bit fields:

 BitsValue/Meaning
 16:16status.subsys: identifies the subsystem that initiated the error or warning.
 0:16status.info: identifies the type of error or warning. Refer to each intrinsic for possible values.

Table 2-4 “Status.subsys Parameter Identifiers” and Table 2-5 “Status.info Parameter Identifiers” represent the possible values returned by the status parameter.

Table 2-4 Status.subsys Parameter Identifiers

Subsystem IDSubsystem
0Successful (no errors)
9CM Loader
098System Aborts
100Switch
101Memory Manager
102Process Manager
103Stack Unwind
104NM Loader
107Virtual Space Management
108Table Management
110Clock/Timer Manager
111High-Level I/O
113Low-Level I/O
114HP-IO Channel Manager
116HP-IB Adapter Manager
121CS80 Disk Manager
122Port (IPC) Facility
123Dispatcher
127CIPER Device Manager
128Terminal I/O Manager for Logging
130Page Printer Device Manager
133Measurement Interface
143File System
145Secondary Storage Management
151Transaction Management
153File System Label Management
154CM Support Routines
155Job and Session
158Break Handling
161Command Interpreter
165Debug Low-Level Breakpoint Management
169CM Debugger
185File System Storage Management
187Error Management
188CM Emulator, Translator, OCT
193Floating-Point Conversion
195Hewlett-Packard SORT
196Hewlett-Packard MERGE
198Eagle A-MUX Device Manager
200U-Code Trap Handler
201Data Communication Buffer Manager
206System Logging
213I/O Services
221Intrinsic Aborts
222Intrinsic Names

 

Table 2-5 Status.info Parameter Identifiers

ValueDescription
0Normal
<0Indicates an error condition
>0Indicates a warning condition

 

Abort Errors

Software traps are interrupts generated by software events in which the operating system interrupts the normal flow of a process' execution. Some intrinsics generate a software trap when they detect certain error conditions. Normally, if an intrinsic causes a trap, the system trap handler aborts the user program. However, you can write a procedure to handle abort errors and use it in place of the default system trap handler, which will permit recovery from errors in certain cases. For more information on handling traps, refer to Trap Handling Programmer's Guide (32650-90026).

When a program is aborted in a batch job, the operating system removes the job from the system unless you precede the command that caused the error with a CONTINUE command. If the program is aborted in an interactive session, the system returns control to the parent process.

Feedback to webmaster