Appendix B: Open PL/I Run-time Error Messages

This appendix contains information on Open PL/I run-time errors, UNIX system error codes, and Open File Manager (OFM) error codes. Run-time errors are detected by the Open PL/I run-time system, or by the operating system.

Run-time Errors

A run-time error is a program exception that occurs during execution. Some examples of program exceptions are:

When such errors occur, the LPI run-time system responds by raising an appropriate condition. If the program has established a handler for the particular condition, the handler is invoked; otherwise, the LPI run-time system performs a default action. A program establishes handlers for various conditions by means that differ from language to language: PL/I procedures can establish handlers by using ON-units, FORTRAN procedures can establish handlers for certain kinds of exceptions by using the ERR= and END= specifiers on I/O statements, and other languages provide no means of handling exceptions.

In the absence of a handler, the default action performed by the LPI run-time system for most conditions except the ENDPAGE (f), FINISH, UNDERFLOW, and ERROR conditions is simply to raise the ERROR condition.

The message line has the following form:

*** Condition ERROR raised

If the ERROR condition was raised as the default action for another condition, the above line is followed by another line:

*** Unhandled condition cccccc[for 000000 on file ffffff] at PC=xxxxxxxx

where

cccccc Is the name of a condition and indicates the nature of the program exception as described in the remainder of this section.
000000 Describes the I/O operation.
ffffff Is the name of the file.
xxxxxxxx     Is the hexadecimal value of the PC at the time the error was detected (usually the address of an instruction in a routine from an LPI run-time library).

If the error is related to an I/O operation on a file, the optional part of the message appears.

I/O errors are program exceptions related to operations on files. End-of-file on sequential input may raise the ENDFILE condition, and errors opening a file usually raise the UNDEFINEDFILE condition. The condition name used by the LPI run-time system for other I/O errors has the form

I0_ERROR_nnn

where nnn is the error code for the particular error: either an LPI run-time system error code or a UNIX system error code.

The AREA condition is raised in two situations: (1) if an attempt is made to allocate a based variable within an area that has insufficient free storage for the allocation, or (2) if an attempt is made to assign one area to another where the maximum size of the source area exceeds that of the target area.

Floating point exceptions raise conditions OVERFLOW, UNDERFLOW, ZERODIVIDE, CONVERSION, INVALID_OPERAND, or INVALID_mmmm, where mmmm is the name of a floating-point function or operation.

OVERFLOW Indicates that the magnitude of a computational result is too large to represent.
UNDERFLOW Indicates that the magnitude of a computational result is too close to zero to represent.
ZERODIVIDE Indicates an attempt to divide by zero (note that the special case of zero divided by zero raises SIGFPE, however).

Note:

This condition is not recognized in cases where integer division is performed. In this case, the ONCODE for a general computational error (99200) is returned.

CONVERSION Is raised when a floating-point value cannot be correctly converted to an integer, to or from another floating-point value of a different size, or to or from a character string representation.
INVALID_OPERAND Results when an operand to a floating-point function (such as SIN, COS, TAN, EXP, and LOG) is out of the range capable of being handled accurately by the system.
INVALID_mmmm     Usually denotes an invalid operand to the indicated floating-point function or operation: the operand is Not-a-Number, +/- infinity, or is outside the mathematical domain of the function or operation.

RTS errors are program exceptions detected by the LPI run-time system not related to I/O. The condition name raised for these errors has the form

 RTS_ERROR_nnn

where nnn is one of the error codes listed in Table B-1. An RTS error related to the conversion of a value from one data type to another is sometimes reported as the CONVERSION condition.

Finally, UNIX signals are errors detected by the system and reported to the program by the system's signaling mechanism. Signaled condition names have the form

SIGxxxx

where xxxx depends on the signal value. The various UNIX signal values are described in your UNIX documentation. On some UNIX systems, floating-point exceptions appear as SIGFPE.

LPI Run-time Error Codes

Table B-1 lists the LPI run-time system error codes (100 –170). The UNIX system error codes (001 – 099) correspond exactly to the UNIX system error codes and are listed in your UNIX documentation.

Code     Meaning
100 Duplicate record
101 File not open
102 Illegal argument
103 Illegal key descriptor
104 Too many files open
105 Bad isam file format
106 Non-exclusive access
107 Record locked
108 Key already exists
109 Is primary key
110 End of file reached
111 No record found
112 No current record
113 File locked
114 File name too long
115 Can't create lock file
116 Duplicate record (warning)
117 Current record pointer undefined
118 Can't allocate memory
119 Bad custom collating
120 Invalid operation
121 Boundary violation on write
122 Boundary violation on sequential file
123 Not available, file locking or closed w/ lock
124 Inconsistent attributes
125 Open -APPEND on KEYED file
126 Open -DAM on non-IDIRECT file
127 Open -SAM on KEYED file
128 File not open or is open for output only
129 File not open or is open for input only
130 Open on file not yet closed
131 KEY specified on sequential file
132 KEY specified on stream file
133 No KEY specified on KEYED file
134 Not a PRINT file
135 Not a STREAM file
136 CALL dataname name not found
137 B-format error (35)
138 BI format error (36)
139 C format error (32)
140 E format error (34)
141 I/O stack overflow
142 Conversion error
143 LIST input item too long
144 Implicit open failed
145 EOF found while parsing edited input
146 End of string on GET/PUT string
147 Invalid format item for GET/PUT string
148 Invalid format for GET
149 Cannot initialize RPG screens
150 File not open for input
151 REWRITE on input file
152 File not open on non-optional "sequential"
153 File open on optional
154 Sequential error on REW or DELE COBOL85
155 Sequential error no next record COBOL85
156 Bad record size on current record
157 Cannot read log record
158 Bad log record
159 Cannot open log file
160 Cannot write log file
161 No transaction
162 No shared memory
163 No begin work yet
164 Can't use nfs
165 Audit trail exists
166 F format error
167 Record number too big for data item
168 Open of wrong file type within transaction
169 CLOSE REEL on non reel file
170 No READ or WRITE before DELETE of record
171 Return from subroutine specified a value
172 Return from function did not specify a value
173 Bad definition for creating a VSAM file
174 No -defext used
175 SET requires INDEXED or VSAM files
176 Missing FROM on REWRITE and not VSAM
Table B-1: LPI Run-time Error Codes

Copyright © 2009 Micro Focus (IP) Ltd. All rights reserved.