Defining the starting record for a report

startrec

Define starting record for a report


SYNTAX

startrec key = expr_list

Define the first record to be read from the driving file. This statement is only effective if called in the initialisation code. If a startrec command is not given, the report starts with the first record in the driving file.

expr_list

The key by which the starting record is to be read, consisting of one or more key values, each of which may be a field, expression or quoted string:

key = expression [, expression]…

The data in the first expression listed is assigned to the first key field of the record, the data in the second to the second key field and so on. Standard rules of assignment are used. If the number of expressions listed is fewer than the number of file key fields, the extra keys are set blank. If the number of expressions listed is greater than the number of file key fields, the extra expressions are discarded.

See The key = clause.

Field values used in a startrec command must be set in earlier initialisation statements.

If no record exists in the driving file with the exact key supplied, processing starts with the record with the next higher key.


EXAMPLE

!init {
     read CapLog key = StarDate
     startrec key = cl_Kirk, cl_Spock
}

RELATED TOPICS

Reports

!drive

endrec