Check : check
Syntax
check ( op { errorcode errorcode } { errorlevel errorlevel } { imbalance imbalance } { output } )
output ::= invalid | all
Input parameters
op |
a boolean Data Set (a boolean condition expressed on one or more Data Sets) |
errorcode |
the error code to be produced when the condition evaluates to false. It must be a
valid value of the errorcode_vd Value Domain (or string if the errorcode_vd
Value Domain is not found). It can be a Data Set or a scalar. If not specified
then errorcode is null.
|
errorlevel |
the error level to be produced when the condition evaluates to false. It must be a
valid value of the errorlevel_vd Value Domain (or integer if the errorcode_vd Value Domain is not found).
It can be a Data Set or a scalar. If not specified then errorlevel is null.
|
imbalance |
the imbalance to be computed. imbalance is a numeric mono-measure Data Set
with the same Identifiers of op. If not specified then imbalance is null.
|
output |
specifies which Data Points are returned in the resulting Data Set:
· invalid returns the Data Points of op for which the condition evaluates to false
· all returns all Data Points of op
If not specified then output is all.
|
Examples of valid syntaxes
check ( DS1 > DS2 errorcode myerrorcode errorlevel myerrorlevel imbalance DS1 - DS2 invalid )
Input parameters type
op
dataset
errorcode
errorcode_vd
errorlevel
errorlevel_vd
imbalance
number
Result type
result
dataset
Additional Constraints
op has exactly a boolean Measure Component.
Behaviour
It returns a Data Set having the following components:
the Identifier Components of op
a boolean Measure named bool_var that contains the result of the evaluation of the boolean dataset op
the Measure imbalance that contains the specified imbalance
the Measure errorcode that contains the specified errorcode; if the Measure bool_var is null then errorcode is null
the Measure errorlevel that contains the specified errorlevel; if the Measure bool_var is null then errorlevel is null
If output is all then all data points are returned. If output is invalid then only the Data Points where bool_var is false are returned.
Examples
Given the Data Sets DS_1 and DS_2:
Input DS_1 (see structure)
Id_1 |
Id_2 |
Me_1 |
|---|---|---|
2010 |
I |
1 |
2011 |
I |
2 |
2012 |
I |
10 |
2013 |
I |
4 |
2014 |
I |
5 |
2015 |
I |
6 |
2010 |
D |
25 |
2011 |
D |
35 |
2012 |
D |
45 |
2013 |
D |
55 |
2014 |
D |
50 |
2015 |
D |
75 |
Input DS_2 (see structure)
Id_1 |
Id_2 |
Me_1 |
|---|---|---|
2010 |
I |
9 |
2011 |
I |
2 |
2012 |
I |
10 |
2013 |
I |
7 |
2014 |
I |
5 |
2015 |
I |
6 |
2010 |
D |
50 |
2011 |
D |
35 |
2012 |
D |
40 |
2013 |
D |
55 |
2014 |
D |
65 |
2015 |
D |
75 |
Example 1
DS_r := check ( DS_1 >= DS_2 imbalance DS_1 - DS_2 );
results in (see structure):
Id_1 |
Id_2 |
bool_var |
imbalance |
errorcode |
errorlevel |
|---|---|---|---|---|---|
2010 |
I |
false |
-8 |
||
2011 |
I |
true |
0 |
||
2012 |
I |
true |
0 |
||
2013 |
I |
false |
-3 |
||
2014 |
I |
true |
0 |
||
2015 |
I |
true |
0 |
||
2010 |
D |
false |
-25 |
||
2011 |
D |
true |
0 |
||
2012 |
D |
true |
5 |
||
2013 |
D |
true |
0 |
||
2014 |
D |
false |
-15 |
||
2015 |
D |
true |
0 |