Ensure data type and format
accept
allows to specify the data type of the entered variable:
ACCEPT var [ NUM[BER] | CHAR | DATE | BINARY_FLOAT | BINARY_DOUBLE ]
Additionally, it allows to specify a format for the entered value:
ACCEPT var [datatype] FORMAT "…"
Number
accept num number format '99.9'
Trying to enter value that does not match the specified format results in SP2-0598: "…" does not match input format "…"
Date
accept start_date date format 'yyyy-mm-dd'
Trying to enter a value that does not match the specified format results in SP2-0685: The date "…" is invalid or format mismatched "…".