The key prompt number indicates to the system at which point all the parts of the key to the record on file have been input so that it can be generated and the main update record can be read in. The number relates to the prompt sequence number displayed down the left hand side of the screen. The number displayed against the prompt definition line that defines the last part of the key is the number that is entered here.

The key is composed of all the S type variables up to and including the prompt specified by the number entered here. These values entered for these prompts are concatenated together. If a KEY CONCAT CHAR is defined in option 4 of the main menu then this character is used as a separator between the composite variable values.

It should be noted that the prompt specified as the KEY PROMPT must be a S type variable. This is a check to make sure that the key definition is correct.

There is a special case for this entry and that is if the user enters 0. This indicates to the system that the record will not be read in by the system in this routine. In such a case, it is up to the user to initialise the record. This can either be done by passing the record from the previous routine via either the COMMON area or the subroutine parameter list. Another method is by reading in the record at the start of the routine by using an insert item. The final method is by selecting the SET BUFFER RECORD TO NULL option in the PROGRAM CHARACTERISTICS screen.

This facility can prove very useful as it effectively turns the record into a total buffer area. This could be used to capture data which may be then treated as parameters for some other process such as an ACCESS statement. Another possibility is that the user may use the screen to update part of a record which has already been accessed in a previous screen. In both cases it should be noted that the primary difference between an entry of 0 for the PROMPT KEY NUMBER and that of a number is that with a 0 entry, NO data is read in or filed away. Hence its usefulness in the above two cases where the user may not wish the data to be written back to disk in the specified routine.