This function returns the value of a numeric field when non‑numeric characters moved into the field result in a runtime error. The $ERROR‑VALUE value can be up to 30 characters in length.
When the ERROR PROCEDURE is invoked because a numeric field contains non‑numeric data, you can use $ERROR‑VALUE to see which positions contain the non‑numeric data. The resulting string of $ERROR‑VALUE shows a ? where non‑numeric data was found. For example, if the string 12A45B was moved into a numeric field, the error procedure is invoked and $ERROR‑VALUE contains 12?45?. The question marks indicate the positions where non‑numeric data was found.
Note: $ERROR functions return meaningful data only in the error procedure or in a procedure or subprogram invoked by the error procedure. In the case of a database error, $ERROR functions can also return meaningful data in the scope of a WHEN ERROR clause. You do not have to pass the $ERROR functions as parameters.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|