Software AG Products 2.4.1 | Reference Guide | Execution Commands | Detailed Syntax | @READSEQUENCE
 
@READSEQUENCE
The @READSEQUENCE command reads records in the sequence in which they are physically located in the data storage. This command does not result in the reading of the record in any particular logical order. The @READSQUENCE command may be used to read an entire file at optimum speed since no access is required to the Associator.
The syntax of the command is as follows:
syntax of read sequence
For example:
@READSEQUENCE1 FIRST.
PERFORM RECORD-HANDLE UNTIL E0F1.
.
.
.
.
RECORD HANDLE.
.
.
.
.
MOVE NAME1 TO NAME-OUTPUT.
COMPUTE SALARY1(1) = SALARY1(1) * 1.05.
@READSEQUENCE1.
The file to be read and the fields within each record for which values are to be returned are specified in the corresponding @ADADCL command, suffixed by the same nnnn.
If the @READSEQUENCE is to begin from the first record of the desired file, the FIRST clause must be used on the first call, and dropped on subsequent calls which will be issued in a processing loop, monitored by the Adabas Pre-Compiler EOF indicator, which will be turned on when an end-of-file condition is encountered.
If the ISN option is specified with the FIRST option, the sequential pass of the file will begin at the first record physically located after the record identified by the ISN specified by id2.
The NOREAD option is used with the FIRST option to perform the positioning of the sequential read without reading the first record. This record will be read during execution of the first subsequent @READSEQUENCE.
The user must be aware that if records are updated while sequential processing of the file is performed with the @READSEQUENCE command, some records may be encountered twice.
The HOLD option, which is required in ET mode, is applied when the user intends to update the record and needs to prevent other users from updating it, before it has been released.
When the RETURN option is used with the HOLD option, it causes the return of response code 145, if the record is already in HOLD state. If the RETURN option is used, it is immediately followed by the program checking for response code 145. Without the RETURN option, the program will be placed in WAIT status, until the desired record is released.
The PASSWORD parameter is used for protected files. The user must provide an identifier containing a valid password.
The CIPHER parameter is used for ciphered files. The user must provide an identifier containing a valid cipher code.