[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|          ON READERROR           |
+---------------------------------+
ON READERROR <command>

-----------------------------------
Executes routine upon input error.
-----------------------------------

The ON READERROR command executes a command, program or procedure when
an input error occurs.  ON READERROR can be used to prompt for proper
input or to provide a help message.  Input errors that ON READERROR
traps for include:

        . invalid dates

        . input that falls outside of a RANGE statement

        . input that does not meet a VALID clause condition

Upon trapping the input error the ON READERROR <command> is executed.
To clear the previous ON READERROR routine, use ON READERROR without
including a <command>.

+---------------------------------+
|         Program Example         |
+---------------------------------+
In this example, if an error occurs during READ, PROCEDURE named ERRHAND
is executed.

SET STATUS OFF
SET TALK OFF
USE customer
ON READERROR DO errhand
@ 10,13 SAY 'Company: ' GET company
@ 12,13 SAY 'Address: ' GET address1
@ 14,13 SAY 'Tax Rate: '
@ 14,23 GET taxrate PICTURE '9.99' RANGE 3,8
READ

PROCEDURE errhand
WAIT 'Error, Please reenter'
RETURN

-----------------------------------

See Also:  @ ... SAY/GET, APPEND, BROWSE, CHANGE, EDIT, INSERT, ON(),
READ

-----------------------------------

See Also: @ ... SAY/GET APPEND BROWSE CHANGE EDIT INSERT ON()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson