RPG Errors [ HP RPG/iX Reference Manual ] MPE/iX 5.0 Documentation
HP RPG/iX Reference Manual
RPG Errors
RPG errors are detected and reported by compiler-generated code. You can
specify in the program what action to take when an error occurs. You can
redirect or suppress the error action. To do this, enter the appropriate
values in both of these Header Specification fields:
1. The Error Log Field (column 55).
2. The Error Response Field (columns 56-71).
The messages listed in this appendix explain the cause of the RPG error
and the action you must take to correct it. In addition to the
"Message", "Cause" and "Action" fields, the three additional fields shown
below are listed for each error:
* ERROR RESPONSE COLUMN
This is the column number (56-71) in the Error Response Field that
corresponds to the error.
* *ERROR
This is the predefined, one-character field where RPG saves a
unique letter code for the error. When you enter 0 or 1 in the
Error Response Field, you can check the contents of *ERROR using
Calculation Specifications.
* ERROR RESPONSE ENTRIES
This field lists the values that you can enter in the Error
Response Field.
--------------------------------------------------------------------------
1 MESSAGE FATAL FILE ERROR, FILENAME = xxxx
CAUSE An operating system error (see ERROR NUMBER in the
File Information Display) or an TurboIMAGE error.
ACTION Determine the cause of the error from the text
displayed with it and correct the program. If you
need additional information, look up the error in the
operating system manual or the TurboIMAGE/iX Database
Management System manual.
ERROR NONE (this error is processed with error number 5).
RESPONSE
COLUMN
*ERRORF
ERROR NONE.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
2 MESSAGE UNIDENTIFIED RECORD, FILENAME = xxxx, RECORD NUMBER =
nnn
CAUSE Record number nnn on the input file named xxxx is not
identifiable.
ACTION Choose one of the error response options. Either
include this record type on Input Specifications or
delete the record from the file.
ERROR 56.
RESPONSE
COLUMN
*ERROR A.
ERROR 0, 1, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
3 MESSAGE MATCHING RECORD SEQUENCE ERROR, FILENAME = xxxx,
RECORD NUMBER = nnn
CAUSE The matching record with record number = nnn and
filename = xxxx is not in sequence.
ACTION Choose one of the error response options and correct
the record sequence.
ERROR 57.
RESPONSE
COLUMN
*ERROR B.
ERROR 1, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
--------------------------------------------------------------------------
4 MESSAGE INPUT SEQUENCE ERROR, FILENAME = xxxx, RECORD NUMBER =
nnn
CAUSE Record number nnn on the input file named xxxx is not
in the proper sequence.
ACTION Put the record in the proper sequence and execute the
program.
ERROR 58.
RESPONSE
COLUMN
*ERROR C.
ERROR 1, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
5 MESSAGE INDEX INVALID, LINE NUMBER =nnn, INDEX = nnn NOT
EVALUATED
CAUSE The array index is less than 1 or greater than the
number of array elements.
ACTION Choose one of the error response options and correct
the program.
ERROR 59.
RESPONSE
COLUMN
*ERROR D.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
6 MESSAGE NEGATIVE SQUARE ROOT, LINE NUMBER = nnn
CAUSE Your program calculated a square root that was
negative.
ACTION Choose one of the error response options and correct
the data.
ERROR 60.
RESPONSE
COLUMN
*ERROR E.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
--------------------------------------------------------------------------
7 MESSAGE TABLE/ARRAY {SEQUENCE, BAD DATA, OVERFILL} FILE =
xxxx, LINE NUMBER = nnn, VALUE = xxx
CAUSE The table or array on file xxxx with a line number =
nnn and value = xxx had a sequence, bad data or
overfill error.
ACTION Choose one of the error response options and correct
the table or array.
ERROR 61.
RESPONSE
COLUMN
*ERROR H.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
8 MESSAGE RECORD NOT FOUND, FILENAME = xxx, STATUS = xxx
CAUSE The record sought was not found. (The STATUS portion
appears only for a TurboIMAGE file.)
ACTION Choose one of the error response options and make the
appropriate changes.
ERROR 62.
RESPONSE
COLUMN
*ERROR U.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
9 MESSAGE SPECIAL FILE ERROR, FILENAME = xxxx
CAUSE The special file processing routine returned an error.
ACTION Check the processing routine and make the appropriate
changes.
ERROR 63.
RESPONSE
COLUMN
*ERROR J.
ERROR 0, 1, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
--------------------------------------------------------------------------
10 MESSAGE RDEXIT ERROR, FILENAME =xxxx
CAUSE The Read Exit file processing routine returned an
error.
ACTION Check the processing routine and make the appropriate
changes.
ERROR 64.
RESPONSE
COLUMN
*ERROR J.
ERROR 0, 1, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
11 MESSAGE ARITHMETIC OVERFLOW, LINE NUMBER = nnn, VALUE = nnn
CAUSE The arithmetic result exceeded the number of digits
the field can hold.
ACTION Correct the program (make the field size larger).
ERROR 65.
RESPONSE
COLUMN
*ERROR N.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
12 MESSAGE DIVIDE BY ZERO, LINE NUMBER = nnn
CAUSE The number was divided by zero.
ACTION Choose one of the error response options and correct
the program.
ERROR 66.
RESPONSE
COLUMN
*ERROR O.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
--------------------------------------------------------------------------
13 MESSAGE INVALID NUMERICAL DATA, LINENUM = nnn, FILENAME =
xxxx, RECORD NUMBER = nnn, COLUMN = nnn, VALUE = nnn
CAUSE Either an input field or an alphanumeric field, being
moved to a numeric field, contained characters other
than numeric characters or embedded blanks.
(FILENAME, RECORD NUMBER, COLUMN and VALUE are printed
only when applicable.)
ACTION Choose one of the error response options and correct
the program.
ERROR 67.
RESPONSE
COLUMN
*ERROR P.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
14 MESSAGE BINARY CONVERSION OVERFLOW, LINENUM = nnn, VALUE = nnn
CAUSE The binary output field was not large enough to hold
the value.
ACTION Define a larger binary field.
ERROR 68.
RESPONSE
COLUMN
*ERROR Q.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
15 MESSAGE INDICATOR HX IS ON (H0-H9)
CAUSE These halt indicators were either turned on
programmatically or turned on due to a file error.
ACTION Choose one of the error response options and correct
the program.
ERROR 69.
RESPONSE
COLUMN
*ERROR NONE.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
--------------------------------------------------------------------------
16 MESSAGE REL REC# INVALID, FILENAME = xxxx
CAUSE An attempt was made to read or write a relative record
number past the end of the file or before the
beginning of the file.
ACTION Choose one of the error response options and correct
the program.
ERROR 70.
RESPONSE
COLUMN
*ERROR M.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
17 MESSAGE DUPLICATE KEY, FILENAME = xxxx, KEY = kkkk
CAUSE The program attempted to write a record having the
same key as a record already in the file and duplicate
keys are not allowed.
ACTION Redefine the file to permit duplicate keys or delete
one of the records.
ERROR 71.
RESPONSE
COLUMN
*ERROR Y.
ERROR 0, 2, 3, 4, 5.
RESPONSE
ENTRIES
--------------------------------------------------------------------------
MPE/iX 5.0 Documentation