CICS Manual do Usuário - READNEXT
Reads the next record during a browse.
Sintaxe
Notas:
Descrição:
READNEXT repeatedly reads records in sequence from a file that is on a local or a remote system. Such a series of sequential read commands is known as a browse of the file.
A browse can also consist of a sequence of READNEXT and READPREV commands in any sequence. A browse must be initiated with the STARTBR command, to identify the starting point of the browse, and terminated with the ENDBR command.
You must provide, in the RIDFLD option, a data area that is large enough to contain a complete identifier (full key, RBA, or RRN) of records that are in the file. This data area can be used both as an output and input argument.
It is used as an output argument when CICS, on completion of each READNEXT command, places the complete identifier of the record that is just retrieved into the RIDFLD data area. CICS then remembers this identifier to mark the point from which the subsequent READNEXT is to continue.
It can also be used as an input argument to allow you to modify the RIDFLD data area contents before you issue subsequent READNEXT commands. This has the effect of repositioning the browse to the new identifier, from which it continues in the usual way. If the browse was started with the GTEQ option, that attribute also applies to the modified RIDFLD option.
A READNEXT command that follows a READPREV command attempts to read the same record as that which is read by the READPREV command. Intervening insertion or deletion activities on the underlying file might cause other records to be read.
If you issue a READNEXT command in a context where an ILLOGIC or IOERROR condition does not terminate a task, and such a condition occurs, the browse is terminated. You will need to reestablish the position of the browse by issuing a STARTBR command before you issue another READNEXT or READPREV command.
Opções:
Condições:
Informações relacionadas: