RPGLE READE et RETURN

RPG (3 et 4, free), CL, SQL, etc...
Répondre
ctalhouet
Messages : 42
Enregistré le : mar. 05 juin 2007, 12:48:27

RPGLE READE et RETURN

Message par ctalhouet »

Dans un PGM RPGLE ( qui se termine par RETURN pour gagner en perf et éviter l'ouverture /fermeture des fichiers ) je fais un setll et CLE reade pour lire des enregistrements
L'indic (que je remets off avant lecture) du reade se mets on si on change de cle ou si fin de fichier réel.
il semble que lorsque l'on atteint la fin réelle du fichier , on reste en fin de fichier malgré les setll de repositionnement .
Il faut faire un open/close en cas de fin de fichier réel ?? mais on à un seul indic pour les 2 cas .


Cdt
C TALHOUET

cmasse
Site Admin
Messages : 813
Enregistré le : mer. 14 févr. 2007, 18:00:03
Localisation : Nantes
Contact :

READE

Message par cmasse »

voici ce que dit la doc :
A READE with the search-arg operand specified that immediately follows an OPEN operation or an EOF condition retrieves the first record in the file if the key of the record matches the search argument. A READE with no search-arg specified that immediately follows an OPEN operation or an EOF condition results in an error condition. The error indicator in positions 73 and 74, if specified, is set on or the 'E' extender, checked with %ERROR, if specified, is set on. No further I/O operations can be issued against the file until it is successfully closed and reopened
http://www-01.ibm.com/support/knowledge ... zreade.htm
Christian Massé (Volubis.fr)

ctalhouet
Messages : 42
Enregistré le : mar. 05 juin 2007, 12:48:27

Message par ctalhouet »

Merçi pour les infos .
Ca confirme nos disfonctionnements ...
Si je passe par open close , on perds l'impact peformance du RETURN ..
Je vais remplacer ca par un SQLSELECT...

Cdt
C TALHOUET

Répondre