Software AG Products 2.4.1 | Reference Guide | Execution Commands | Detailed Syntax | @READVALUE
 
@READVALUE
The @READVALUE command determines the range of values present for a given descriptor, and the number of records which contain each value, which is returned in the ISN-QUANTITYnnnn field.
The syntax of the command is as follows:
syntax of read value
For example:
@ADADCL1, VEHICLES MAKE, MAKE.
.
.
@READVALUE1 FIRST.
PERFORM RECORD-HANDLE UNTIL E0F1.
.
.
.
RECORD-HANDLE.
.
.
MOVE MAKE1 TO . . . . .
MOVE ISN-QUANTITY1 TO . . . ..
.
.
@READVALUE1.
The information is read from the Associator inverted lists, without any access to data storage.
The desired descriptor, for which values are to be returned must be specified in the search-criteria clause of the corresponding @ADADCL command. The field-expressions clause may contain the descriptor name. With each @READVALUE command, the next value of the descriptor is returned to the record buffer.
The FIRST option positions the values read on the lowest or highest value of the desired descriptor, as specified in the value buffer. It also positions the ending value in case of specifying a range as a search criterion in the corresponding @ADADCL command. This option must be used on the first call and dropped on subsequent calls on the same pass of the file. Provide the desired value in the field V-descriptor-namennnn or V-descriptor-namennnn-F and V-descriptor-namennnn-T, of the value buffer before issuing the first @REDLVALUE command. If the descriptor is a field within a periodic group, the field ISNnnnn contains occurrence number in which the value being returned is located.
The DESCENDING clause indicates that the values read should be done in descending order.
The NOSTARTVALUE clause combined with the DESCENDING clause indicates that descending values read should start from the bottom of the file and that the value in the value buffer should be ignored.
The NOREAD option is used with the FIRST option to perform the positioning of the sequential read without retrieving the first value This value will be retrieved during execution of the first subsequent @READVALUE.
The PASSWORD parameter is used for protected files. The user must provide an identifier containing a valid password.