dilluns, 18 de gener del 2010

Codis d'error en programes RPGLE

Dins un bloc monitoritzat amb MONITOR a RPGLE, si hi ha cap excepció, tindrem el codi d'excepció a la variable %STATUS.

Aquest codi pot ser:

Normal Codes

Code
Condition
00000
No exception/error occurred
00001
Called program returned with the LR indicator on.
00050
Conversion resulted in substitution.
Exception/Error Codes

Code
Condition
00100
Value out of range for string operation
00101
Negative square root
00102
Divide by zero
00103
An intermediate result is not large enough to contain the result.
00104
Float underflow. An intermediate value is too small to be contained in the intermediate result field.
00105
Invalid characters in character to numeric conversion functions.
00112
Invalid Date, Time or Timestamp value.
00113
Date overflow or underflow. (For example, when the result of a Date calculation results in a number greater than *HIVAL or less than *LOVAL.)
00114
Date mapping errors, where a Date is mapped from a 4-character year to a 2-character year, and the date range is not 1940-2039.
00115
Variable-length field has a current length that is not valid.
00120
Table or array out of sequence.
00121
Array index not valid
00122
OCCUR outside of range
00123
Reset attempted during initialization step of program
00202
Called program or procedure failed; halt indicator (H1 through H9) not on
00211
Error calling program or procedure
00222
Pointer or parameter error
00231
Called program or procedure returned with halt indicator on
00232
Halt indicator on in this program
00233
Halt indicator on when RETURN operation run
00299
RPG IV formatted dump failed
00301
Class or method not found for a method call, or error in method call.
00302
Error while converting a Java array to an RPG parameter on entry to a Java native method.
00303
Error converting RPG parameter to Java array on exit from an RPG native method.
00304
Error converting RPG parameter to Java array in preparation for a Java method call.
00305
Error converting Java array to RPG parameter or return value after a Java method.
00306
Error converting RPG return value to Java array.
00333
Error on DSPLY operation
00351
Error parsing XML document
00352
Invalid option for %XML
00353
XML document does not match RPG variable
00354
Error preparing for XML parsing
00401
Data area specified on IN/OUT not found
00402
*PDA not valid for non-prestart job
00411
Data area type or length does not match
00412
Data area not locked for output
00413
Error on IN/OUT operation
00414
User not authorized to use data area
00415
User not authorized to change data area
00421
Error on UNLOCK operation
00425
Length requested for storage allocation is out of range
00426
Error encountered during storage management operation
00431
Data area previously locked by another program
00432
Data area locked by program in the same process
00450
Character field not entirely enclosed by shift-out and shift-in characters
00451
Conversion between two CCSIDs is not supported.
00501
Failure to retrieve sort sequence.
00502
Failure to convert sort sequence.
00802
Commitment control not active.
00803
Rollback operation failed.
00804
Error occurred on COMMIT operation
00805
Error occurred on ROLBK operation
00907
Decimal data error (digit or sign not valid)
00970
The level number of the compiler used to generate the program does not agree with the level number of the RPG IV run-time subroutines.
09998
Internal failure in ILE RPG compiler or in run-time subroutines
09999
Program exception in system routine.



Table 8. Exception/Error Codes
Code Device1 RC2 Condition
01011 W,D,SQ n/a Undefined record type (input record does not match record identifying indicator).
01021 W,D,SQ n/a Tried to write a record that already exists (file being used has unique keys and key is duplicate, or attempted to write duplicate relative record number to a subfile).
01022 D n/a Referential constraint error detected on file member.
01023 D,SQ n/a Error in trigger program before file operation performed.
01024 D,SQ n/a Error in trigger program after file operation performed.
01031 W,D,SQ n/a Match field out of sequence.
01041 n/a n/a Array/table load sequence error.
01042 n/a n/a Array/table load sequence error. Alternate collating sequence used.
01051 n/a n/a Excess entries in array/table file.
01071 W,D,SQ n/a Numeric sequence error.
011214 W n/a No indicator on the DDS keyword for Print key.
011224 W n/a No indicator on the DDS keyword for Roll Up key.
011234 W n/a No indicator on the DDS keyword for Roll Down key.
011244 W n/a No indicator on the DDS keyword for Clear key.
011254 W n/a No indicator on the DDS keyword for Help key.
011264 W n/a No indicator on the DDS keyword for Home key.
01201 W 34xx Record mismatch detected on input.
01211 all n/a I/O operation to a closed file.
01215 all n/a OPEN issued to a file already opened.
012163 all yes Error on an implicit OPEN/CLOSE operation.
012173 all yes Error on an explicit OPEN/CLOSE operation.
01218 D,SQ n/a Record already locked.
01221 D,SQ n/a Update operation attempted without a prior read.
01222 D,SQ n/a Record cannot be allocated due to referential constraint error
01231 SP n/a Error on SPECIAL file.
01235 P n/a Error in PRTCTL space or skip entries.
01241 D,SQ n/a Record number not found. (Record number specified in record address file is not present in file being processed.)
01251 W 80xx 81xx Permanent I/O error occurred.
01255 W 82xx 83xx Session or device error occurred. Recovery may be possible.
01261 W n/a Attempt to exceed maximum number of acquired devices.
01271 W n/a Attempt to acquire unavailable device
01281 W n/a Operation to unacquired device.
01282 W 0309 Job ending with controlled option.
01284 W n/a Unable to acquire second device for single device file
01285 W 0800 Attempt to acquire a device already acquired.
01286 W n/a Attempt to open shared file with SAVDS or IND options.
01287 W n/a Response indicators overlap IND indicators.
01299 W,D,SQ yes Other I/O error detected.
01331 W 0310 Wait time exceeded for READ from WORKSTN file.
Notes:

"Device" refers to the devices for which the condition applies. The following abbreviations are used: P = PRINTER; D = DISK; W = WORKSTN; SP = SPECIAL; SQ = Sequential. The major/minor return codes under column RC apply only to WORKSTN files.
The formula mmnn is used to described major/minor return codes: mm is the major and nn the minor.
Any errors that occur during an open or close operation will result in a *STATUS value of 1216 or 1217 regardless of the major/minor return code value.
See Figure 9 for special handling.


En aquesta plana de Midrange els trobarem tots i en forma de constants.