The example1.cp program shows how to use cursors in an interactive query program. The program:
Displays a list of book types; user selects one type
Displays all titles in the selected book type; prompts for a title ID
Displays detailed information about the selected title and continues prompting for title IDs
Exits when Return is pressed at a prompt