CICS Manual do Usuário - READPREV
Reads the previous record during a browse.
Sintaxe:
Notes:
Descrição:
READPREV repeatedly reads records in reverse 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 series of READNEXT and READPREV commands in any sequence. A browse must be initiated with the STARTBR command, to identify the start 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 in the file. This data area can be used both as an output and as an input argument.
It is used as an output argument when CICS, on completion of each READPREV 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 READPREV 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 READPREV commands. This has the effect of repositioning the browse to the new identifier, from which it continues in the usual way. The modified record identifier must always be a full key, RBA, or RRN.
If you include a READPREV command immediately following a STARTBR command, your STARTBR command must specify the key of a record that exists on the file; otherwise, the NOTFND condition occurs for the READPREV command.
A READPREV command that follows a READNEXT command reads the same record as that which is read by the READNEXT command.
Intervening insertion or deletion activities on the underlying file might cause other records to be read.
If you issue a READPREV command in a context in which 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 READPREV or READNEXT command.
Opções:
Condições:
Informações relacionadas: