|
Setting MAXDATAEXCPT: It's Under Your Control
"I desperately need this report, AND I need it now!" you hear, and with this your customer delivers a flat file and a file layout and you create a MASTER and FOCEXEC to produce this critical report. Unfortunately, there are errors, and FOCUS terminates.
(FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : FLD2
(FOC200) INTERRUPT. DATA EXCEPTION
(FOC201) INTERRUPT. DIVISION BY ZERO
(FOC204) TOO MANY INTERRUPTS. RUN TERMINATED |
The FOC200 error is caused by a field with a numeric ACTUAL, but incorrect format definition in the ACTUAL statement. For instance,
FIELD=FLD2,,USAGE=P8,ACTUAL=P4,$ |
but when we view the field in HEX, we see that it does not contain valid packed values.
The FOC1130 error is usually caused by a field described with numeric USAGE, and Alpha ACTUAL, that contains actual data that is not all numeric (leading spaces are allowed). Or it could be caused by a smart date format USAGE, if the ACTUAL value is not a valid date.
The FOC201 error is caused by a calculation that results in division by zero, if %STRICTMATH = NEW (the default for EDA). If %STRICTMATH = OLD, then division by zero will not give an error, but result in a 0 answer.
Now, let's take a look at the FOC204. What is causing the data exceptions? One possible situation is an incorrect MASTER description that does not correctly map the data. Generally, this shows up as some type of FOC1130 or FOC200 on every record (or perhaps even more than one such error. In that case, as soon as you get two or three of these errors, you know that you have to change the MASTER and try again. You certainly don't want to view a million of these errors on your screen. Alternatively, the MASTER may be correct for the layout you were given, but the file may include a HEADER record or TRAILER record with different descriptions. In that case, and because this is urgent, you might choose to live with the errors, and just continue processing.
FOCUS comes equipped with a settable tolerance level that represents the maximum permissible number of any individual error before it gives the FOC204 and terminates. Before release 7.3.4, that maximum was established at installation time, with a default of 10. Changing that default required a zap by the person who installed FOCUS. (Note: Setting the maximum to 0 means no limit.) This method proved difficult for our users, however, as it was system wide and not sensitive to a particular report or file, or even application.
Today (as of release 7.3.4), that control is in your hands and users can set the maximum allowable number of data exceptions as follows:
Certainly, FOCPROF or FOCPARM can set a system wide default, but individual users can reset it based on their application needs. Issue ? SET MAXDATAEXCPT to check the current setting.
|