IBM i - RPG IV - Gestion des erreurs fichiers

Trucs & Astuces - Langages

AddThis Social Bookmark Button

 

La gestion des erreurs fichier en RPG IV se fait par l'intermédiaire du code *STATUS et du code opération Monitor.

 

 C MONITOR

C NUMHOM Chain HOM01PF
C if %found()
** Code Si Enregistrement Trouvé et Non verrouillé.
C endif
C ON-ERROR 1218

 C ENDMON

 

 Les codes *STATUS disponibles sont :

01021 Tried to write a record that already exists

01022 Referential constraint error detected on file member.

01023 Error in trigger program before file operation performed.

01024 Error in trigger program after file operation performed.

01031 Match field out of sequence.

01041 Array/table load sequence error.

01042 Array/table load sequence error. Alternate collating sequence used.

01051 Excess entries in array/table file.

01071 Numeric sequence error.

 01121 No indicator on the DDS keyword for Print key.

01122 No indicator on the DDS keyword for Roll Up key.

01123 No indicator on the DDS keyword for Roll Down key.

01124 No indicator on the DDS keyword for Clear key.

01125 No indicator on the DDS keyword for Help key.

01126 No indicator on the DDS keyword for Home key.

1201 34xx Record mismatch detected on input.

01211 I/O operation to a closed file.

01215 OPEN issued to a file already opened.

01216 Error on an implicit OPEN/CLOSE operation.

01217 Error on an explicit OPEN/CLOSE operation.

01218 Record already locked.

01221 Update operation attempted without a prior read.

01222 Record cannot be allocated due to referential constraint error

01231 Error on SPECIAL file.

01235 Error in PRTCTL space or skip entries.

01251       80xx 81xx Permanent I/O error occurred

01285 Attempt to acquire a device already acquired.

01286 Attempt to open shared file with SAVDS or IND options.

01287 Response indicators overlap IND indicators. 01299 Other I/O error detected.

01331 Wait time exceeded for READ from WORKSTN file. 

01241 Record number not found. (Record number specified in record address file is not present in file being processed.)

01255 82xx 83xx Session or device error occurred. Recovery may be possible.

01261 Attempt to exceed maximum number of acquired devices.

01271 Attempt to acquire unavailable device

01281 Operation to unacquired device.

01282 Job ending with controlled option.

01284 Unable to acquire second device for single device file