EVALOPT parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:
<td>If on, the evaluating request will be cancelled on a non-convertable number. </td></tr>
<td>If on, the evaluating request will be cancelled on a non-convertable number. </td></tr>
<tr><th>X'04'</th>
<tr><th>X'04'</th>
<td>If on, nulls will be considered as non-convertable numbers. </td></tr>
<td>If on, nulls will be considered as non-convertable numbers and the evaluating request cancelled . </td></tr>
</table>
</table>
<p>
<p>

Revision as of 22:35, 7 February 2023

Evaluation options

Summary

Default value
0
Maximum value
7
Parameter type
User
Where set
Any user
Introduced
V7.8 (Options 2 & 4 added in V7.9)

Description

The user parameter EVALOPT allows optional modifications to evaluation behaviors. The bits in EVALOPT have the following meanings:

X'01' If on, the evaluating request will be cancelled on truncation of a data string.
X'02' If on, the evaluating request will be cancelled on a non-convertable number.
X'04' If on, nulls will be considered as non-convertable numbers and the evaluating request cancelled .

For example, consider the following code:

%v is string len 2 initial('ST') %s is string len 1 %f is float %n is float %s = %v %f = %v %n = printtext {~} = {%s} printtext {~} = {%f} printtext {~} = {%n}

If EVALOPT is set to 0 (default), then the above code would allow silent truncation and give the result:

%s = S %f = 0 %n = 0

If EVALOPT is set to 1 , then the above code is cancelled with the following message:

M204.0552: Variable too small for result

If EVALOPT is set to 2 or 4 , then the above code is cancelled with the following message:

M204.2985: Invalid numeric conversion