Are individual records independent transactions? If so, you probably do not want an Abend. You would want to note that there is a problem with a particular record (e.g. via MASK ) write a problem report, and continue with the next record/transaction.
However, if the entire run is an interdependent set of transactions, you would want an error in one record to cause an abend. Unfortunately, as noted in earlier posts, Natural will do arithmetic with not numeric data. Hence, you are faced with two prospects.
Either do a MASK test and conditionally end the program
Or, use Natural to force an Abend for bad data. I am guessing that you are either using READ WORK FILE RECORD (which does not do data validity checking), or using READ WORK FILE into a single large alpha variable, which is REDEFINEd into fields, some of which are numeric.
If the latter, you might consider using READ WORK FILE with separate fields. Now this would lead to a performance “hit”. You could minimize this by something like:
define data local
1 alpha1 (a70)
1 redefine alpha1
2 first-alpha (a12)
2 second-alpha (a22)
1 first-dollar-field (n8.2)
READ WORK FILE alpha1 first-dollar-field alpha2 second-dollar-field etc
So the only fields that are being isolated are the ones that require checking. all other fields would be incorporated in longer alpha strings.