ECL Error Reference
ECL ERRORS
ECL ERROR CODES
This Chapter features ECL Error Codes
1
1
no resulting expression tree
2
2
"there is an expression tree, but should not be executed"
3
3
1001
1001
Error in macro expansion (see error
follows)
This warning indicates there is an error in the macro expansion.
Since the compiler will issue an error in the macro, this warning is used
only for informational purposes; it gives the position where the macro is
called to help the user trace down the problem.
Solution: Resolve the error that follows this warning first.
Example:
01: f(x) := MACRO
02: x+3;
03: ENDMACRO;
04:
05: EXPORT aaa := f(4);
In line 1-3, a value macro f is defined. This is a value macro
because it has no Attribute defini- tions. That means the macro body must
be legal to appear wherever a value expression may appear. Clearly, the
semicolon at the end of line 2 is extraneous, so this warning saying that
there is an error in the macro expansion at line 5 appears, and an error
following this warning says the error is in line 2 of the macro.
1004
1004
LOCAL specified on dataset that is not
Distributed
In a SORT or JOIN function, LOCAL can be specified to indicate that
the sort or join should be performed while maintaining the distribution of
a previously distributed dataset. A dataset is consided to be distributed
if:
• it has been explicitly distributed as the result of the DISTRIBUTE
function
• it is defined as already distributed by the DISTRIBUTED
function
Solution: Use DISTRIBUTE or DISTRIBUTED to distribute the dataset,
or remove the LO- CAL option.
Example:
01: aaa := DATASET(‘aaa’,{STRING1 f1}, FLAT);
02: distibuted_aaa := DISTRIBUTE(aaa, RANDOM());
03: distibuted_aaax := DISTRIBUTED(aaa, RANDOM());
04:
05: OUTPUT(SORT(aaa, f1, LOCAL));
06: OUTPUT(SORT(distibuted_aaa, f1, LOCAL));
07: OUTPUT(SORT(distibuted_aaax, f1, LOCAL));
There are 3 datasets defined (in lines 1, 2, 3). We use the LOCAL
option to sort them (in lines 5,
6, 7). The first one is not distributed, therefore we get this
warning in the SORT on line 5. The
second is the result of the DISTRIBUTE function, and the third is
specified as already DIS-
TRIBUTED. Therefore, lines 6 and 7 compile without warning or
error.
1005
1005
Input is explicitly Distribited but Local not
specified
In a SORT or JOIN function, the dataset(s) involved is(are)
distributed, but LOCAL is not
explicitly specified. See Warning C1004 for information on
distributed.
Solution: Add the LOCAL option, or make sure the dataset is not
distributed. Example:
01: aaa := DATASET(‘aaa’,{STRING1 fa; }, FLAT);
02: distibuted_aaa := DISTRIBUTE(aaa, RANDOM());
03: distibuted_aaax := DISTRIBUTED(aaa, RANDOM());
04:
05: OUTPUT(SORT(distibuted_aaa, fa));
06: OUTPUT(SORT(distibuted_aaax, fa));
On lines 5 and 6, distributed_aaa and distributed_aaax are
distributed, but no LOCAL option is specified in the SORT. Adding ,LOCAL
to the SORT in lines 5 and 6 will fix this problem.
1006
1006
CASE does not have any
condition
No condition is given for the CASE statement. This makes the CASE
statement unnecessary under the normal situation. This is allowed for easy
use for some special circumstances, like automatic code generation using
ECL template language.
Solution: Make sure this is what you wanted. Example:
INTEGER i := 10;
INTEGER j := CASE(i, 3);
for other reasons.
1007
1007
Module occurs twice in scope
1010
1010
Unsupported language feature
The language feature for which this warning appears is not supported
yet. However, the parser can recognize this feature. This means either it
is under development, or is deliberately left out
Solution: Make sure your QueryBuilder program is the latest version.
The feature may be sup- ported already in a newer version than the one
your are using. Otherwise, find a workaround solution for you
problem.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa; }, FLAT);
02: a1 := aaa(fa = ‘a’);
03: a2 := aaa(fa = ‘b’);
04: OUTPUT(a1-a2);
We get this error on line 4 if the dataset difference operation is
not supported yet. NOTE: It may be already supported when you read
this!
1012
1012
';' is not legal here (empty statement is not allowed)
1013
1013
A field in transform already assigned a value
1014
1014
physicalLength is not needed, ignored
1015
1015
Module is already imported
1016
1016
Syntax obsoleted: use alternative
1017
1017
Empty assignall has no effort
1018
1018
Unsupported service attribute
1019
1019
An service attribute does not need a value
1020
1020
Module name mismatch
1021
1021
OUTPUT record contains no variables - probably an error
1022
1022
Condition is always true
1023
1023
Condition is always false
1024
1024
#WARNING statement
1025
1025
Duplicate case values
1026
1026
Local will be ignored for a grouped dataset
1027
1027
Local expected
1028
1028
Grouping will be ignored.
1029
1029
No longer used (this is now an error, not a warning)
1030
1030
Counter not used in transform
1031
1031
Merge inputs don't appear to be sorted
1032
1032
Merge inputs don't appear to match
1033
1033
Definition is sandboxed
1034
1034
Definition reference sandbox
1035
1035
regular expression syntax
1036
1036
deprecated syntax
1037
1037
group input does not appear to be sorted
1038
1038
1039
1039
1040
1040
1041
1041
1042
1042
1043
1043
1044
1044
1045
1045
1046
1046
1047
1047
1048
1048
1049
1049
2000
2000
2001
2001
Type mismatch - Real value
expected
In the context where the error occurs, a real value is expected. A
real value can be an real con- stant, or an expression that evaluates to a
real value. Therefore, 12, 12.34, LOG(0.4)+3, are valid, but ‘12.34’ and
‘String’ are not.
Solution: Make sure the expression in question evaluates to a real
number. A string constant, like ‘123.2’ is NOT a real number. For C
programmers, don’t think ‘C’ or ‘1’ is a char, and therefore can be used
as an integer (or real); there is no char type in ECL. Type casting may be
needed in some cases. For example: (REAL4)‘12.34’ creates a valid real
value by casting the strinf to real. Checking the code before and after
the offending code often helps.
Example:
01: v1 := EXP(‘STR’);
02: v2 := LN(‘STR’);
03: v3 := LOG(‘STR’);
04: v4 := POWER(‘STR’, 12);
05: v5 := ROUND(‘STR’);
06: v6 := ROUNDUP(‘STR’);
07: v7 := SQRT(‘STR’);
08: v8 := TRUNCATE(‘STR’);
09: v9 := REALFORMAT(‘STR’,3,4);
These examples all need to change to a real value. All the functions
expect real value as the first parameters.
2002
2002
Type mismatch – Integer value
expected
An integer value is expected in the context. An integer value can be
an integer constant, or an
expression that evaluates to an integer value The following is a
(not necessarily complete) list
where an integer value is expected:
• BIG_ENDIAN value
• LITTLE_ENDIAN value
• WAIT (value)
• expr1 op expr2, where op can be: %, DIV, &, |, ^
• substring range: [ start_index .. end_index]
• CHOOSE(expr, choose_list)
• CHOOSEN(dataset, value)
• DEDUP(…, KEEP value)
• INTFORMAT(value1, value2, value3)
• REALFORMAT(real_value, value1, value2) All bold expressions must
be integer values.
Solution: Make sure the value is an integer value. Use type cast if
necessary. Example:
01: WAIT(‘STR’);
02: v1 := 10.2 % 11.2;
03: v2 := 10.2 DIV 11.2;
04: v3 := 10.2 | 11.2;
05: v4 := 10.2 & 11.2;
06: v5 := 10.2 ^ 11.2;
07: STRING s := ‘This is a string.’;
08: s[0.23];
09: s[0.23..2.34];
10: s[..2.3];
11: s[2.3..];
12: INTFORMAT(1.2, 2.2, 3.3);
13: REALFORMAT(1.0, 2.0, 3.0);
14: CHOOSE(3.2, 9, 8, 7, 6, 5);
15: aaa := DATASET(‘aaa’,{STRING1 fa; }, FLAT);
16: OUTPUT(choosen(aaa,10.2));
17: OUTPUT(DEDUP(aaa, fa = ‘A’, KEEP 2.2));
All bold expressions cause such an error.
2003
2003
Type mismatch - String value
expected
A string value is expected. A string value can be a string constant,
or an expression that evaluates
to a string value. The following is a list that a string is
expected:
• EVENT(expr1, expr2)
• LENGTH(value)
• TRIM(value [, options])
All bold expressions must be string values.
For C/C++/Java/Pascal etc programmers, string constants are enclosed
in single quotes (‘’) in ECL, not double quotes (“”). Also, ECL currently
only supports two escape sequences: \’ and \\ which stands for the single
quote and backslash. Support for more escape sequences may be added as
needed in the future.
Solution: Make sure the expression is a string constant or evaluates
to a string value. Use type cast or TRANSFER as needed.
Example:
01: WAIT(EVENT(123, TRUE));
02: len := LENGTH(123);
03: STRING s:= TRIM(123);
2004
2004
Type mismatch - Integer or real value
expected
An integer or real value is expected. It can be an integer constant,
real constant, or an expression that evaluates to a real or integer value.
The following is a list of cases where an integer or
real value is expected:
• expr1 + epxr2
• expr1 – expr2
• POWER(value1, value2)
• AVE(dataset, expr)
• AVE(GROUP, expr)
• DISTRIBUTE(dataset, value)
• DISTRIBUTED(dataset, value, tranform) This error is the same as
error C2072.
Solution: Make sure it is a integer or real value. Use type casting
if necessary. Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa; }, FLAT);
02: i := 3 + TRUE;
03: j := 4 - TRUE;
04: x1 := POWER(20, TRUE);
05: x2 := AVE(aaa, ‘string’);
06: x3 := AVE(GROUP, ‘string’);
07: d1 := DISTRIBUTE(aaa, ‘abc’);
08: d2 := DISTRIBUTED(aaa, TRUE);
All bold expressions are expected to be integer or real
value.
2005
2005
Table type mismatch
???
Solution: Example:
2006
2006
Record type mismatch
???
Solution: Example:
2007
2007
Incompatible types
There is a type incompatiblity problem here. This normally a result
of some other error, like
“Integer value is expected”.
Solution: Resolve the error before this one (if any) first,
otherwise, make sure the types are compatible.
Example:
01: i := 3 + TRUE;
02: STRING20 s := ‘ABC’;
03: TYPEOF(s) y := 10;
First, an Error C2004 will be reported by the compiler, then this
error will be reported. For line
3, since TYPEOF(s) is STRING20, so we such an error for assignment
:=10.
2008
2008
Type does not require
parameters
No parameter is required for a user defined type. A user defined
type can be defined in ECL
using TYPE. A user defined type can have parameters. See Example
below.
Solution: Try to get rid of the parameter(s). Example:
01: MyType := TYPE
02: EXPORT INTEGER Load(INTEGER x) := x+1;
03: EXPORT INTEGER Store(INTEGER x) := x-1;
04: END;
05:
06: MyRec := RECORD
07: MyType(3) abc;
08: END;
09:
10: NeedC(INTEGER len) := TYPE
11: EXPORT String Load(String S) := ‘C’+S[1..len];
12: EXPORT String Store(String s) := S[2..len+1];
13: EXPORT Integer PhysicalLength(String s) := len;
14: END;
15:
16: Rec := RECORD
17: NeedC(3) good;
18: NeedC(3,5) abc;
19: NeedC xyz;
20: END;
In line 7, this error ocurrs. Line 10-14 shows an example that
defines a user type with parameter. Line 17 is fine, but an error C2061
occurs in line 18, and C2062 occurs in line 19.
2009
2009
Boolean/Set
of/Integer/Real/String/Table/Record/Unknown value
expected
A certain type is expected to be passed as the parameter in this
context. Solution: Make sure the passed parameter is one of the expected
types.
2010
2010
Illegal operand for TYPEOF
The operand for TYPEOF must be an expression whose type is
known.
In ECL, we can get the type of an expression and use it as type. All
the following are legal uses of TYPEOF:
TYPEOF(‘ABC’) x1 := ‘XYZ’;
TYPEOF(5) x2 := 10;
STRING20 s := ‘ABC’;
TYPEOF(s) x3 := ‘DEF’;
TYPEOF(x1) x4 := ‘GHI’
Solution: Make sure the type of the operand is known.
2011
2011
Cannot nest TYPE
declarations
TYPE defintions cannot be nested.
Solution: Define these TYPEs separately instead of nested.
Example:
ReverseString4 := TYPE
MyType := TYPE
EXPORT INTEGER Load(INTEGER x) := x+1; EXPORT INTEGER
Store(INTEGER x) := x-1;
END;
END;
SHARED STRING4 Rev(String4 S) := s[4]+s[3]+s[2]+s[1]; EXPORT
String4 Load(String4 s) := Rev(s);
EXPORT String4 Store(String4 s) := Rev(s);
Here, inside the TYPE defintion for ReverseString4, we are trying to
define another TYPE MyType. This nesting is not allowed.
2012
2012
Datasets must be the same
type
The datasets have different types. The + and – operations can be
applied to datasets and these
two datasets must have the same type. Two datasets are of the same
type if:
• Both are defined as the same DATASET type
• Both are defined as a subset of the same DATASET using
filters
• One is defined as a DATASET type, the other is a subset of the
same type using filter
Two datasets are not the same type if:
• They are defined with different DATASET names, even if they have
exactly the same
RECORD structures.
• One is defined as a DATASET type, the other is derived from the
same DATASET type using TABLE(), even if they have exactly the same RECORD
structure.
The following example illustrates these rules.
01: aaa := DATASET(‘aaa’, {STRING1 fa; STRING1 fb;}, HOLE);
02: bbb := DATASET(‘bbb’, {STRING1 fa; STRING1 fb;}, HOLE);
03:
04: a1 := aaa(fa = ‘a’);
05: a2 := aaa(fa = ‘b’);
06: a3 := TABLE(aaa, {aaa.fa,aaa.fb});
07:
08: OUTPUT(aaa+a1); // OK
09: OUTPUT(a1+a2);
10:
11: OUTPUT(a1+a3); // BAD
12: OUTPUT(aaa+bbb);
In line 8, aaa is a dataset type, a1 is a subset of the same type
using a filter (line 4). In line 10, both a1 and a2 are subsets of dataset
type aaa. They are OK.
In line 11, a3 is derived from aaa using TABLE(). In line 14, aaa
and bbb are different dataset types, although they have exactly the same
structure.
Solution: Follow the above guidelines to make sure the two datasets
involved are the same type. The fact that they have the same structure is
not enough.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa; }, FLAT);
02: bbb := DATASET(‘bbb’, {STRING1 fa; }, HOLE);
03:
04: OUTPUT(aaa+bbb,{fa});
05: OUTPUT(aaa-bbb,{fa});
06:
07: a1 := aaa(fa = ‘a’);
08: a2 := aaa(fa = ‘b’);
09:
10: OUTPUT(a1+a2);
11: OUTPUT(a1-a2);
2013
2013
The types must be the same
The items that are in question must have the same type. More
precisely, the types must be exactly the same, not just compatible. See
Error C2012 for more details on how two dataset types are treated as the
same type.
Solution: Make sure they have the same type. Example:
01: aaa := DATASET(‘aaa’, {STRING1 a;}, HOLE);
02: bbb := DATASET(‘bbb’, {STRING1 b;}, HOLE);
03: ccc := aaa(a=’a’);
04: s1 := if(aaa=bbb,’true’,’false’);
05: s2 := if(aaa=ccc,’true’,’false’);
06: s3 := if(aaa!=bbb,’true’,’false’);
07: s4 := if(aaa!=ccc,’true’,’false’);
In this example, we are comparing the equality of two datasets. Two
dataset must be the same types if we want to compare them.
2014
2014
List element has unknown type
2015
2015
Integer type expected
A valid INTEGER type is expected. A valid INTEGER type can be
INTEGER or INTEGERn, where n is 1, 2, 4 or 8. Note that this error is
different from Error C2002, where an integer value is expected.
Solution: Make sure it is an valid INTEGER type. Example:
01: BIG_ENDIAN STRING i := ‘ABC’;
02: LITTLE_ENDIAN BOOLEAN b := FALSE;
BIG_ENDIAN and LITTLE_ENDIAN can be used on valid INTEGER types
only.
2016
2016
Integer or decimal type
expected
A valid INTEGER or DECIMAL type is expected. A valid INTEGER type
can be INTEGER
or INTEGERn, where n is 1, 2, 4 or 8. A valid decimal type can be
DECIMALn where n is an
positive integer, or DECIMALn_y where n and y are positive integers.
This normally happens
after the UNSIGNED keyword, which can be applied to INTEGER or
DECIMAL types only.
Note that this error is different from Error C2001, 2002, where an
integer value or real value is
expected.
Solution: Make sure it is a valid INTEGER or DECIMAL type.
Example:
UNSIGNED STRING s := ‘ABC’;
UNSIGNED BOOLEAN b := FALSE;
UNSIGNED cannot be used with STRING or BOOLEAN.
2017
2017
String type expected
A valid STRING type is expected. A valid STRING type can be STRING
or STRINGn, where n is an integer that is greater than 0.
The following list are the cases this error can occur:
• ASCII type
• EBCDIC type
The bold type must be a valid STRING type. Note that this error is
different from Error C2003, where a string value is expected.
Solution: Change it to a valid STRING type. Example:
01: ASCII INTEGER s1 := 123;
02: EBCDIC BOOLEAN b := TRUE;
All bold types should be a STRING type as expected by ASCII or
EBCDIC.
2018
2018
Indexing ALL is undefined
2019
2019
Type mismatch - Integer or string value
expected
2020
2020
COUNT not valid in this
context
In the context where this error occurs, COUNT is not allowed.
COUNT (as an alias to the COUNTER keyword) is only allowed in the
following two cases:
1. As a parameter passed to the transform function in
NORMALIZE:
NORMALIZE(dataset, expression, myTranform (LEFT,COUNT));
2. As a parameter passed to the transform function in
DENORMALIZE:
DENORMALIZE(dataset, expression, myTranform (LEFT,COUNT));
The COUNT keyword is not allowed to be used anywhere else.
Please note that the COUNT() function can be applied to a dataset,
as in COUNT(Person()); Solution: Make sure it is in the NORMALIZE or
DENORMALIZE context. If you are using
COUNT to count the number of tuples in a dataset, use the function
COUNT(): the ( ) is
required to use it as a function.
Example:
01: NamesRec := RECORD
02: UNSIGNED1 numRows := 0;
03: STRING20 thename;
04: STRING20 addr1 := ‘’;
05: STRING20 addr2 := ‘’;
06: STRING20 addr3 := ‘’;
07: STRING20 addr4 := ‘’;
08: END;
09:
10: NamesTable := DATASET([
11: {1, ‘Gavin’, ’10 Maltings Lane’},
12: {2, ‘Liz’, ’10 Maltings Lane’, ‘3 The Cottages’},
13: {0, ‘Mr Nobody’},
14: {4, ‘Mr Everywhere’, ‘Here’, ‘There’, ‘Near’, ‘Far’}
15: ], NamesRec);
16:
17: OutRec := RECORD
18: UNSIGNED1 order;
19: UNSIGNED1 numRows;
20: STRING20 thename;
21: STRING20 addr;
22: END;
23:
24: OutRec NormalizeAddresses(NamesRec L, INTEGER C) := TRANSFORM
25: SELF := L;
26: SELF.order := C;
27: SELF.addr := CHOOSE(C, L.addr1, L.addr2, L.addr3, L.addr4);
28: END;
29:
30: NormalizeAddrs := NORMALIZE(namesTable, LEFT.numRows,
31: NormalizeAddresses(LEFT,COUNT));
32:
33: OUTPUT(NormalizeAddrs);
This example is a correct use of COUNT. We can also replace the
COUNT keyword with
COUNTER. The output of this example is:
Order
NumRows
thename
addr
1
1
Gavin
10 Maltings Lane
1
2
Liz
10 Maltings Lane
2
2
Liz
3 The Cottages
1
4
Mr Everywhere
Here
2
4
Mr Everywhere
There
3
4
Mr Everywhere
Near
4
4
Mr Everywhere
Far
Example:
MyValue := COUNT + 3;
OUTPUT(Person( career = ‘Study’), {per_first_name, COUNT});
Both statements will produce a C2002 error since they are not in the
context of NORMALIZE
or DENORMALIZE.
2021
2021
COUNTER not valid in this
context
The COUNTER keyword (as an alias of COUNT) is used only in NORMALIZE
or
DENORMALIZED. See Error 2020 for explanation, solution etc.
2022
2022
LEFT not legal here
The LEFT keyword is not legal in this context. LEFT can be used only
in the following contexts:
• Passing a parameter to a TRANSFORM function where a LEFT scope
exists.
• In TRIM(value, LEFT). LEFT means leading spaces.
• In JOIN(dataset1, dataset2, join-fields, LEFT OUTER | LEFT
ONLY).
• In DEDUP(recordset, expression, LEFT). LEFT means to keep the head
records from the comparison when duplication happens.
Solution: Make sure LEFT is in one of the legal contexts listed
above. Example:
01: a := EXP(LEFT);
02: NamesRec := RECORD
03: STRING20 thename;
04: END;
05: NamesTable := DATASET([{‘Gavin’}], NamesRec);
06: OutRec := RECORD
07: STRING20 thename;
08: END;
09: OutRec NormalizeAddresses(NamesRec L, INTEGER C) :=
10: TRANSFORM
11: SELF := L;
12: END;
13: NormalizeAddrs := NORMALIZE(namesTable, LEFT.numRows,
14: NormalizeAddresses(LEFT,COUNT));
In line 1, LEFT is within none of the above contexts. In line 13 and
14, LEFT is used to specify the left record passed to the transform
function.
2023
2023
RIGHT not legal here
This is very simliar to Error 2022. Refer to it for
information.
2024
2024
JOIN is not valid here
See Error C2027.
2025
2025
SELF not legal here
SELF can only be used inside a TRANSFORM structure to indicate the
current output record. Otherwise it is not legal.
Solution: Don’t use SELF outside a TRANSFORM structure.
2026
2026
ALL not legal here
ALL is illegal in this context. ALL can only be used in the
following contexts:
• Inside a GROUP function
• As a optional parameter to TRIM function
• As a default value to a SET or SET OF parameter.
Solution: Make sure it is one of the above cases, otherwise, don’t
use ALL. Example:
01: aaa := DATASET(‘aaa’, {STRING1 f1;}, HOLE);
02: bbb := GROUP(aaa, ALL);
03: s := ‘ abc ‘;
04: TRIM(s, ALL);
05: f(SET is, INTEGER i) := i IN is;
06: MyJobSet := [1,2,3];
07: BOOLEAN ok := f(ALL, 1);
08: SORT(aaa, ALL);
All lines from 1-7 are legal. In line 8, ALL is not in any of the
legal contexts and causes this error.
2027
2027
JOINED can only be specified inside SORT or
SORTED
JOINED can only be used inside SORT or SORTED. Otherwise, it is
illegal.
Solution: Make sure it is in the SORT or SORTED.
2028
2028
A value must be supplied for this
attribute
The attribute in question needs to be supplied a value. In ECL, we
cannot just declare an at- tribute without defining its value. There is
only one exception, that is when the attribute name starts with a $. Names
that start with a $ will be used as environment variable in the future,
but that functionality is not implemented yet.
Solution: Use := to define a value to it. Example:
01: integer1 a;
02: EXPORT STRING1 s;
03: SHARED BOOLEAN b;
Attributes a, s and b (whether it is local, EXPORTed, or SHARED)
need a value when they are being defined.
2029
2029
Constant doesn’t make any sense
here
Using a Constant doesn’t make sense in this context. For example,
sorting or grouping by a constant doesn’t make sense.
Example:
01: aaa := DATASET(‘aaa’,{STRING1 a; }, FLAT);
02: iftotal := IF(TRUE, 1, 0);
03:
04: countrec := RECORD
05: total := SUM(GROUP, iftotal);
06: END;
07:
08: a := OUTPUT(TABLE(aaa,countrec,1));
In line 8, the last 1 is not making sense.
2030
2030
Illegal join flags for a lookup join
2031
2031
DEDUP(file) not supported (or meaningful) on hole files
2032
2032
Scheduling not allowed on an attribute (scheduling a definition
makes no sense)
2033
2033
Multiple workflow clauses
2034
2034
Expected INDEX()...
2035
2035
Type returned from transform must match the source dataset
type
2036
2036
Keyed parameter does not match the dataset passed as a second
parameter
2037
2037
Name of base file was not supplied and cannot be deduced
2038
2038
BIAS not supplied and can't be calculated
2039
2039
Character in string literal is not defined in encoding
2040
2040
Invalid size for INTEGER
type
An INTEGER type can only be 1, 2, 4 or 8 bytes. The size is
specified by appending the size right after the INTEGER keyword (no space
allowed), as in: INTEGER1, INTEGER2, etc. By default, the size is 8;
INTEGER is the same as INTEGER8.
Solution: Make sure it is one of the following:
INTEGER1, INTEGER2, INTEGER4, INTEGER8 or INTEGER. No space is
allowed between INTEGER and the size digit.
All identifiers that are INTEGER followed by a legal octal integer
are reserved (for future extension, or just for the purpose of type
checking). Therefore, INTEGER5 is neither a legal type, nor a legal
identifier for attribute, function, formal parameter name, etc.
Example:
01: INTEGER3 x := 10;
02: INTEGER10 y := 30;
03: f(INTEGER INTEGER32) := INTEGER32 + 3;
In line 1 and 2, the size is wrong. In line 3, we can not use
INTEGER32 as an identifier for formal parameter.
2041
2041
Invalid size for REAL type
A REAL type can be 4 or 8 bytes. So the valid forms are: REAL4,
REAL8, and REAL. The last one will use the default size: 8.
Solution: Choose the proper size. Example:
REAL3 a := 1.2;
2042
2042
Invalid size for DATA type
The size of DATA type can be any positive integer; zero or negative
integers are not allowed. When used as a function parameter type, the size
can be omitted.
Solution: Choose a proper size. Example:
01: DATA0 a := ’03DF21';
2043
2043
Invalid size for STRING type
The size of STRING type can be any positive integer; zero or
negative integers are not allowed.
When used as a function parameter type, the size can be
omitted.
Solution: Choose a proper size. Example:
STRING0 abc := ‘abc’;
2044
2044
Invalid size for VARSTRING
type
The size of VARSTRING can be any positive integer; zero or negative
integers are not allowed. Solution: Choose the proper size.
Example:
VARSTRING0 abc := ‘abc’;
2045
2045
Invalid size for DECIMAL
type
A DECIMAL type does not specify or specifies an invalid size. An
valid size must be specified for DECIMAL type. DECIMAL can be:
• DECIMALn, where n can be 0-32 (inclusive)
• DECIMALn_m, where n, m can be 0-32 (inclusive), and m must be less
than or equal to n. In the above, n defines the number of digits in a
packed decimal value while m defines the
number of digits that appear after the decimal point.
Solution: Choose a proper size. Example:
01: DECIMAL x1 := 20;
02: DECIMAL10_11 x2 := 20;
In line 1, no size is defined. In line 2, the size of the fractional
portion is greater than the total number of digits.
2046
2046
A UDECIMAL type does not specify a size or specifies an invalid
size. UDECIMAL is a short-
hand alias for UNSIGNED DECIMAL. UDECIMAL can be:
• UDECIMALn, where n can be 0-32 (inclusive), OR
• UDECIMALn_m, where n, m can be 0-32 (inclusive), and m must be
less than or equal to
n.
In the above, n defines the number of digits in a packed decimal
value. m defines the number of digits after the decimal point.
Solution: Choose a proper size. Example:
01: UDECIMAL x1 := 20;
02: UDECIMAL10_11 x2 := 20;
03: UDECIMAL34 x3 := 20;
In line 1, no size is defined. In line 2, the size of percision is
greater than the total length. In line
3, the size is greater than 32.
Solution: Choose the proper size.
2047
2047
Invalid size for BITFIELD
type
A BITFIELD (PROVISIONAL DOCUMENTATION, NOT YET IMPLEMENTED)
type must have a valid size. A valid size for BITFIELD must:
• explicitly specify the size
• spcify the size in the range 1..64 (inclusive) Solution: Choose a
proper size.
Example:
01: MyRec := RECORD
02: BITFIELD sex := 1;
03: BITFIELD0 married := 1;
04: BITFIELD2 class := 1;
05: BITFIELD65 age := 100;
06: END;
In line 2, sex does not specify a size. In line 3, married specifies
a size of 0. In line 5, age speci- fies a size of 65. All these are not
allowed. In line 4, class has size of 2, which is legal.
2048
2048
Invalid size for UNSIGNED
type
UNSIGNEDn is a shorthand alias for UNSIGNED INTEGERn. So see Error
2040.
2049
2049
Invalid size for QSTRING type
2050
2050
Recursive macro call
Recursive macro calls are not allowed. Recursive calls happen when a
macro call itself directly or indirectly. Unlike functions, macros have no
way to terminate once a recursive call starts; because the parser just
does simple text substitution for macros. Recursive functions terminate at
runtime by proper runtime logic.
Note that since there are no forward references in ECL, it is also
not possible to contruct a legal recursive function call. This situation
may be changed in the future, however, recursive macros will still not be
allowed due to the above reason.
Solution: Change the code to eliminate the recursion.
Example:
01: f(x) := MACRO
02: g(x)+3
03: ENDMACRO;
04:
05: g(x) := MACRO
06: f(x)+2
07: ENDMACRO;
08:
09: h(X) := MACRO
10: h(x)+1
11: ENDMACRO;
12:
13: abc := g(3);
14: xyz := h(4);
In the example, macro f calls g, and g calls f again. Therefore we
have an indirect recursive call. In macro h, it directly calls itself
recursively.
2051
2051
No matching ENDMACRO found
The ENDMACRO keyword must terminate a MACRO definition.
Due to the way macros are implemented internally, sometimes this
error will appear in an unex- pected place. This happens within a macro
call because, according to the grammar the parser thinks it should end the
macro call, but the macro definition actually still has more code to
generate. This normally indicates an error in the macro, the parameter(s)
passed to the macro, or a combination of the two.
Solution: Check the macro definition and the calls. Since the parser
only realizes that an ENDMACRO is missing when it reaches the end of a
file or a module, the position its report may be far away from the place
it actually occurs.
Example:
01: MyMacro(INTEGER i) := MACRO
02: i + 4;
03:
04: MyMacro(5);
MyMacro is not terminated by an ENDMACRO. But the parser report the
error at end of line 4 (the end of the file).
2052
2052
EOF encountered while gathering macro
parameters
The file ends while the parser is still trying to look for macro
parameters. This means that the code is not yet complete.
Solution: Complete the code with proper parameters, and ending ‘)’.
Example:
01: m2(x) := MACRO
02: 10+x
03: ENDMACRO;
04: m2(1
In line 4, macro call m2 doesn’t have complete parameters.
2053
2053
No type is allowed for macro parameter
2054
2054
Default value for macro parameter must be constant
2055
2055
2056
2056
2061
2061
Too many parameters: XXX parameters
expected
Too many parameters are supplied for a function call or macro
call.
Solution: Check the definition of the function or macro. Supply the
proper number of param- eters as required. Be careful about the scope
rules in ECL, especially the local scope. See Ex- ample 2 below.
Example 1:
01: f(x) := 4;
02:
03: m1() := MACRO
04: 10
05: ENDMACRO;
06:
07: m2(x) := MACRO
08: 10+x
09: ENDMACRO;
10:
11: f(2,3);
12: m1(1);
13: m2(1,2);
All the calls in lines 11, 12, and 13 have extra parameters than
that are needed. Example 2:
01: f(x) := x+1;
02:
03: EXPORT ab := 1;
04:
05: f(x,y) := x+y;
06:
07: f(3,4,1);
In this example, function f is defined twice. Since an EXPORT or
SHARED Attribute ends the local scope of an attribute/function/macro name,
the f() in line 7 is a call to function f in line 5, not in line 1,
therefore too many parameters are supplied.
2062
2062
Omitted parameter has no default
value
A parameter to a function can be omittable when it is defined to
have a default value. When a function is called, parameters that have
default values can be omitted or not. However, those parameters that have
no default values defined must pass a value for the parameter.
Default value parameters in ECL are more general than in C++. In
C++, if a parameter is defined to have default value, all the parameters
following it must have default values defined as well, and if we supply a
value to a parameter when we call a function, all parameters before this
parameter must have values supplied. In ECL, these two constraints do not
hold. The user can define default values for any set of parameters,
regardless of their order in the parameter list. The user can also choose
to pass values to those parameters that do have default values. See
Example 2 below.
Note that macros in ECL don’t have this default value concept,
therefore this error can never happen to a macro call.
Solution: Either pass a value for the parameter, or specify a
default value in the function defini- tion, if possible.
Example 1:
01: f(x,y,z=3) := x+y;
02:
03: f(12);
04: f(,2);
In line 1, function f() only has a default value defined for the
third parameter, so we must supply values for parameters 1 and 2. In line
3, no default value is given for parameter 2, and in line 4, no default
value is given for parameter 1.
Example 2:
01: f(x=1,y,z=3) := x+y;
02:
03: f(2,3,4);
04: f(,3);
05: f(,3,);
06: f(,3,4);
07: f(1,2);
In line 1, function f() defines default values for parameters 1 and
3, which is perfectly OK in ECL, but is not allowed in C++. Calls in lines
3-7 are all legal in ECL, while calls in lines 4,5,6 are illegal in C++
(supposing line 1 were legal in C++).
2063
2063
Too few parameters supplied
Too few parameters are supplied to a macro call. Note that since
function calls in ECL have the
default value for omitted parameter rule (Error C2062), we can never
get this error from a
function call. Be careful with the scoping rules in ECL, as shown in
Example 2.
Example 1:
01: m(x) := MACRO
02: 10+x
03: ENDMACRO;
04: m();
05: m2(x,y) := MACRO
06: 10+x
07: ENDMACRO;
08: m2(1);
The macro calls in both lines 4 and 8 are supplied fewer parameters
than required. Example 2:
01: m() := MACRO
02: 2
03: ENDMACRO;
04: SHARED y:= 3;
05: m(x) := MACRO
06: x+2
07: ENDMACRO;
08: m();
In this example, call m() in line 8 is to the macro defined in lines
5-7, not the macro defined in lines 1-3. The reason is that the SHARED
statement in line 4 ends the scope of local macro m() in line 1.
2064
2064
param type mismatch
The parameter supplied to a function call has a different type than
the type specified for the
function definition. Automatic type promotion (implicit type
casting) will be applied when the
compiler tries to match the types. Therefore, we can legally use an
integer to call a function that
requires a real parameter. Narrow casting (down casting from real to
integer) is also applied
when proper.
A macro is used for text substitution, only. There is no type
information associated with a macro parameter. Therefore, this error only
applies to function calls.
Solution: Check the function definition and make sure the types
match. Use type cast when necessary.
Example:
01: f(integer i) := i+1;
02: f(‘123’);
In line 2, actual parameter ‘123’ is a string, not an integer as
expected by the definition of f. We can use type casting to correct
this:
f((INTEGER)‘123’);
2065
2065
Wrong number of parameters: either 2061 or 2062
2066
2066
non-typed or void expression can not used as parameter
2071
2071
Constant expression expected
A constant expression is expected. A constant expression can
be:
any constant value, such as: 123, ‘abc’.
any expression that evaluates to a constant value, such as:
2*4+5, ‘abc’+’def ’, 3>2 && 3^2=8.
any function or macro that evaluates at compile time to a
constant value. For example, if we have the following:
c(x) := x*2;
y := 3;Then c(y) is a constant since at compile time, it can
be evaluted as a constant value 6.
The third rule is different from languages like C and Java where a
function’s return value is never regarded as a compile time constant,
macros in C (Java doesn’t have macros) are not an issue since they
disappear after preprocessing.
The following are not constants:
RANDOM(), or any expression that contains RANDOM()
The result from a dataset, such as COUNT(Person())
Any expression that contains any non-constant value(s).
Solution: Choose another name for the field, or remove one if
they are just duplicated.
Example 1:
01: STRING8 MyString1 := INTFORMAT(10, RANDOM(), 1);
02: c(x) := x*2;
03: y := 3;
04: STRING8 MyString2 := INTFORMAT(10, c(y), 1);
05: ct := COUNT(Person());
06: STRING8 MyString3 := INTFORMAT(10, ct, 1);
Both RANDOM() in line 1 and ct in line 6 are not constant,
but c(y) in line 4 is constant. Example 2:
01: loadxml(‘myxml.xml’);
02: #DECLARE (S)
03: #SET (S, RANDOM())
04: #APPEND(S, RANDOM())
05: #IF (RANDOM())
06: #APPEND(S, ‘x := 1; ‘)
07: #ELSE
08: #APPEND(S, ‘x := 2; ‘)
09: #END
All these RANDOM() function calls are illegal since constants are
expected where they appear. To test this, an xml file named myxml.xml must
be provided, but the content of the file is not important for our
concern.
2072
2072
Expected numeric expression
An expression that is not compatible with a numeric type is
encountered. A numeric expression
can be: INTEGER, REAL, or DECIMAL (for all legal size, and signed,
unsigned types). This
error happens in the +, -, *, / operations. In the
expression:
expr1 + expr2
if one of the expr1 and expr2 is string, the other is implicitly
cast to string (if it is not already string, and can be cast to string).
For instance:
x := 123 + ‘STR’
is a legal expression, and x has the value: ‘123STR’. For other
operations (-, *, /), only numeric values are allowed. Implicit cast may
be involved, but:
• A string is not implicitly cast to a numeric value (while an
numeric can be implicitly cast to a string value).
• A boolean vaue cannot be cast to either string or numeric
values.
• A DATA value can only be cast to or from STRING, and not to or
from a numeric value.
Solution: Change the expression to be a numeric type. Use explict
casting where proper. Example:
01: x1 := TRUE + 35;
02:
03: x2 := 35 - ‘STR’;
04:
05: x3 := 34 * ‘STR’;
06:
07: x4 := 12 * x’abcd’;
All bold expressions are not numeric (and cannot be implicitly cast
to a numeric value).
2073
2073
Expected boolean expression
A boolean expression is expected where this error occurs. For C
programmers, integer is not
compatible with boolean in ECL. So 0, 1 or 2 are not a legal boolean
values as in C. You can cast
an INTEGER to a BOOLEAN.
The following is a partial list of where a boolean expression is
expected:
• IF(condition, expr1,expr2)
• MAP(condtion1=>expr1,…,condition_n=>exprn, defvalue)
• IFBLOCK(condition)
• WHEN
• WHICH(condition1,…,conditions)
• REJECTED(condition1,…,conditions)
• #IF(condition)
Solution: Use boolean expression instead. Use comparison (=, !=,
<>, etc.) to change an integer to a boolean when proper.
Example:
01: x1 := NOT 2;
02: x2 := FALSE AND ‘STR’;
03: x3 := TRUE OR x’abcd’;
04: x4 := IF (2,3,4);
05: x5 := MAP(1=>3,4);
06: x6 := WHICH(‘2’,3<4);
All the bol expressions should be replaced by boolean
expressions.
2074
2074
‘(‘ expected
An open parenthesis ‘(’ is missing. This error normally happens in
ECL template commands:
• #DECLARE
• #IF
• #FOR
• #SET
Solution: Add a ‘(‘ and ‘)’ if needed. Example:
01: loadxml(‘myxml.xml’)
02:
03: #DECLARE s
04:
05: #IF TRUE
06: #END
07:
08: #SET s
09:
10: #FOR item(%’type’% = ‘count’)
11: #APPEND(s, ‘count’)
12: #END
All bold expressions should be surrounded by parentheses.
2075
2075
‘)’ expected
A close parenthesis ‘)’ is missing. This error normally happens in
ECL template commands:
Solution: Add the missing ‘)’.
Example:
01: loadxml(‘myxml.xml’)
02:
03: #DECLARE (s
04:
05: #IF (TRUE
06: #END
07:
08: #SET (s,3
09:
10: #FOR (item(%’type’% = ‘cunt’)
11: #APPEND(s, ‘count’)
12: #END
The compiler may not do well enough to point out every missing ‘)’
in this example, so looking around is always a good idea.
2076
2076
',' expected
A comma (‘,’) is expected. Normally this means another parameter is
expected, or the program construct is incomplete.
Solution: Check the context where the error occurs and make sure to
supply complete parameters or complete constructs.
Example:
01: #SET (s)
#SET expects two parameters instead of one.
2077
2077
identifier expected
An identifier is expected. This normally means the code expected an
attribute name. Solution: Check the context, and make sure understand the
construct you are using.
Example:
01: #DECLARE (1)
02: #SET(1,2)
2078
2078
; expected
2079
2079
Expected an 8 byte file position
2080
2080
Fileposition should be the last field in an index
2081
2081
Import names unknown module
XXX
The IMPORT names a module that appears not to exist. In ECL, ll
modules are defined and
stored in a central ECL repository.
Solution: Make sure the module exists in the ECL repository and its
name is spelled correctly for the IMPORT. If you believe the module is
there and you still have problem, this is often a
system configuration problem. Unless you are unfamiliar with the
system, contact your system administrator.
The following information is only for the advanced user who will do
the configuration by him/ herself. If you are using Query Builder program,
use the Connections tab in the File/Preferences dialog. Use the Quick
Config button if you can. If youare running a local ECL server, you can
first use the Quick Config to set up the Jack and Hole cluster. Then
change the ECL server to point to you machine (either the machine name or
IP will be OK).
Example:
IMPORT unknown_module;
In the above example, unknown_module is not the ECL
repository.
2091
2091
JOINED must specify a sorted
dataset
In the SORT function:
SORT (recordset, value [, value …], JOINED(joinedset)]);
the parameter to JOINED must be a sorted set.
A sorted dataset is either a dataset that is labeled as SORTED, or
the result set of a SORT
function.
Solution: Label the dataset as SORTED if it is already sorted,
otherwise sort it first. Normally, we need a temporary attribute to hold
the sorted dataset because of Error C2161.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa}, hole);
02: bbb := DATASET(‘bbb’, {STRING1 fb}, hole, aaa);
03: sorted_bbb := SORTED(bbb, fb);
04: OUTPUT(SORT(aaa, fa, JOINED(bbb)));
The bbb is not a sorted dataset in line 4, so we get this error.
sorted_bbb is sorted, so we can solve this problm by replacing bbb with
sorted_bbb.
2092
2092
JOINED data set has different number of sort
fields
In the SORT statement:
SORT (recordset, value, [value…], JOINED(joinedset));
the number of sort fields in joinedset and the number of field to be
sorted on for the recordset must be the same.
The sort fields are the fields that are specified in the SORT or
SORTED statement. For example:
SortedPerson := SORT(person, first_name, last_name);
has 2 sort fields: first_name, and last_name, and
sortedPerson2 := SORTED(sortedPerson, first_name);
has only 1 sort field: first_name as specified in the SORTED
statement, although sortedPerson was sorted on two fields.
Solution: Specify the same number of sort fields as required.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 f1, STRING1 f2}, hole);
02: sored_aaa := SORT(aaa,f1,f2);
03: OUTPUT(SORT(aaa, f2, JOINED(sorted_aaa)));
04: // this is OK although sorted_aaa was sorted on 2 fields.
05: sorted_aaa2 := SORTED(sorted_aaa,f1);
06: OUTPUT(SORT(aaa, f2, JOINED(sorted_aaa2)));
07: bbb := DATASET(‘bbb’, {STRING1 fb}, hole);
08: sorted_bbb := SORTED(bbb,fb);
09: OUTPUT(SORT(aaa, f1, f2, JOINED(sorted_bbb)));
In line 3, sorted_aaa has 2 sort fields (f1, f2 as defined in line
2), while the outer sort to aaa only has 1 field (f2). In line 9,
sorted_bbb has 1 sort field while sort on aaa has 2. Both cases are not
allowed. Note that line 6 is OK since sorted_aaa2 has only 1 sort field
specified although sorted_aaa was sorted on two fields.
2093
2093
Component of JOINED has different type to this
sort
In the SORT statement:
SORT (recordset, value, [value…], JOINED(joinedset));
the type of each field specified in SORT (by value, [value…]) must
be the same as the sort fields
in the joinedset. The type is compared in the order they are
specified. (Note that they must have
the same number of fields, see Error 2092.)
Solution: Make sure they have the same types. Example:
01: aaa := DATASET(‘aaa’, {STRING1 f1, BOOLEAN f2}, hole);
02: sorted_aaa := SORT(aaa,f1);
03: OUTPUT(SORT(aaa, f2, JOINED(sorted_aaa)));
04:
05: sorted_aaa1 := SORT(aaa,f1,f2);
06: OUTPUT(SORT(aaa, f2, f1, JOINED(sorted_aaa1)));
In line 2, sorted_aaa is sorted on f1, whose type is STRING1.
However, in line 3, we are sorting aa on field f2 which is of type
BOOLEAN. In line 6, we should know that the order of the fields
matters.
2094
2094
Too many joined clauses
In a SORT statement, only one JOINED clause is allowed. If we give
more than one JOINED clause, we get this error.
Solution: Remove extra JOINED clause, and only keep one.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 f1, BOOLEAN f2}, hole);
02: sorted_aaa := SORT(aaa,f1);
03: OUTPUT(SORT(aaa, f1, JOINED(sorted_aaa), JOINED(sorted_aaa)));
Two JOINED clauses are presented in the SORT of line 3.
2095
2095
Implicit joins are only supported in HOLE
2096
2096
The list to be sorted on can not be empty
2097
2097
Invalid size for UNICODE or VARUNICODE type
2098
2098
Incompatible locales in unicode arguments of binary operation
2099
2099
Bad locale name
2100
2100
Definition must define EXPORTed or SHAREed
value for XXX.
You are trying to use an attribute that is defined in a module but
not EXPORTed or SHARED. If you want use an attribute that is defined in
another module, the attribute must be EXPORTed. If you are using an
attribute defined in the same module, bt in a different file (a Query
Build window), it must be defined as SHARED.
Solution: Export or share the attribute. Example:
Inside MyModule:
01: SmallPersonSet := CHOOSEN(Person(), 50);
ECL code that is trying to use SmallPersonSet:
01: import MyModule;
02: output(MyModule.SmallPersonSet);
We get this error since SmallPersonSet is defined, but neither
EXPORTed or SHARED.
2101
2101
Error in referenced attribute
2110
2110
A value for XXX has already been
specified
In a TRANSFORM definition, each field of the return record structure
must receive a value once (otherwise Error 2111 occurs) and only once
(otherwise this error occurs).
Note that the collective assignment definition:
SELF := label;
places a value in each field of the result record from its matching
field in the label record. How- ever, this collective assignment
definition can be overwritten by a following individual assign- ment
definition to one or more of the fields. This is a special exception. The
execution engine can detect this situation if a following assignment
definition exists.
Solution: Make sure to only define each output field once. Use CSE,
MAP, CHOOSE, or IF
when proper so that there is only one assignment definition for each
output ield.
Example:
01: NamesRec := RECORD
02: STRING20 thename;
03: STRING20 addr1 := ‘’;
04: STRING20 addr2 := ‘’;
05: END;
06:
07: OutRec := RECORD
08: STRING20 thename;
09: STRING20 addr;
10: END;
11:
12: OutRec Trans(NamesRec L, INTEGER C) :=
13: TRANSFORM
14: SELF := L;
15: SELF.addr := CHOOSE(C, L.addr1, L.addr2);
16: SELF.addr := ‘ABC’;
17: END;
2111
2111
Transform does not supply a value for field
XXX
In a TRANSFORM definition, each field of the return record structure
must recieve a value, either explicitly by an assignment definition, or
implicitly by
SELF := label;
Either way, we must guarantee each field receives a value.
Solution: Ensure a value is placed in the field. If you want the
field just get the value of a corre- sponding filed in an input record,
the two fields must have the same names.
Example:
01: NamesRec := RECORD
02: //STRING20 thename;
03: STRING20 addr1 := ‘’;
04: STRING20 addr2 := ‘’;
05: END;
06:
07: OutRec := RECORD
08: STRING20 thename;
09: STRING20 addr;
10: END;
11:
12: OutRec Trans(NamesRec L, INTEGER C) := TRANFORM
13: SELF := L;
14: SELF.addr := CHOOSE(C, L.addr1, L.addr2);
15: END;
Since we commented out the field thename in NamesRec definition
(line 2), and we don’t explicitly place a value in OutRec’s thename field
(line 13-15), we get this error. We can either un- comment line 2, or
place a value in OutRec.thename within the transform to resolve the
problem.
2112
2112
A field called XXX is already defined in this
record
A field with the same name as the one in question is already defined
in the record. Field names must be unique within a record definition. It
doesn’t matter if their types are the same or not.
Solution: Choose another name for the field, or remove one if they
are just duplicated. Example:
01: MyRec := RECORD
02: STRING20 name;
03: INTEGER1 age;
04: STRING20 name;
05: INTEGER1 name;
06: END;
In the above example, name is aleady defined in line 2, the
definitions in line 4 and 5 are not allowed.
2113
2113
TRANSFORM required a record return type
2114
2114
Can not assign type XXX to self
2115
2115
Transform must have at least 1 parameter
2116
2116
Dataset can not be used in transform
2117
2117
Can not use dataset directly in transform parameters
2121
2121
Invalid substring range
The index to a string is in an illegal range. There are 3
cases:
• If a start index is specified, it must e in the range [1 ..
string_len], inclusive.
• If a stop index is specified, it must be in the range [1 ..
string_len], inclusive.
• If both start index and stop indexes are specified, the start
index must be less than or equal to the stop index.
The <more info> will explain which case the error is. If there
are mutiple cases in one substring expression, only the first error is
given (to reduce the number of error messages). For the C/ C++/Java
programmers, ECL indexing always starts at element 1 (not 0).
This error is a compiler error, not a runtime error. Don’t count on
the compiler to do all the index checking for you. It is always a good
idea to mae sure the index is in proper range. For example:
01: STRING concat(STRING x, STRING y) := x+y;
02: STRING a := ‘a’;
03: STRING b := ‘bc’;
04: STRING c := concat(a,b);
05: c[10];
The compiler cannot know that the index value (10) in line 5 is out
of range. The behavior is undefined if the index is out of range at
runtime.
Solution: For indexing string constants, make sure it is in proper
range. For strings of unknown size (like a STRING parameter passed to a
function), use the LENGTH function as necessary.
Example:
01: STRING3 s := ‘abc’;
02: s1 := s[0];
03: s2 := s[1..4];
04: s3 := s[3..2];
We get the following error message:
error C2121: Invalid substring range: start index out of [1..len]
error C2121: Invalid substring range: end index out of [1..len]
error C2121: Invalid substring range: start index > end index
2124
2124
STORED() has zero length
2130
2130
Value for field XXX cannot be computed in this
scope
Inside an OUTPUT, the output record specifies a field that is not
part of the dataset. The example will help to clarify this.
Solution: Remove the offending field from the output record set.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa }, HOLE);
02: bbb := DATASET(‘bbb’, {STRING1 fb }, HOLE);
03:
04: OUTPUT(aaa, {aaa.fa, bbb.fb});
In line 4, field bbb.fb is not a field of output dataset aaa,
therefore cannot be specified here.
2131
2131
Incorrect assertion scoping
There is a problem with the scoping of the referenced attribute.
There are several cases.
• In a filter, each referenced field must be a field of the dataset
we are filtering. The examplewill help to clarify this.
• In SORT, the field to be sorted must be a field of the dataset
that is being sorted.
• In SORTED, the field that is specified as having been sorted on
must be a field of the dataset.
And much more…
Solution: Remove the offending field from the filter. Example
1:
01: aaa := DATASET(‘aaa’, {STRING1 fa }, HOLE);
02: bbb := DATASET(‘bbb’, {STRING1 fb }, HOLE);
03:
04: OUTPUT(aaa(fa=’Good’, bbb.fb=’Bad’));
This is a filter example. In line 4, the filter bbb.fb = ‘Bad’
refers to a field of dataset bbb, but we are trying to filter dataset
aaa.
Example 2:
01: aaa := DATASET(‘aaa’, {STRING1 fa }, HOLE);
02: bbb := DATASET(‘aaa’, {STRING1 fb }, HOLE);
03: ccc := SORT(aaa, fa, bbb.fb);
This is a SORT example. In line 3, bbb.fb is not a field of the
dataset aaa which we are sorting.
2132
2132
Assertion must be boolean
Each filter for a dataset must be a boolean expression. This error
usually follows error C2073: Boolean expression expected.
Solution: Change the expression in question to a boolean expression.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 f1; STRING1 f2; }, HOLE);
02: bbb := aaa(f1);
03: ccc := aaa(f1*2);
In line 2, f1 is not boolean type, and in line 3, f1*2 gives an
error, and results in an unknown type filter.
2133
2133
Use dataset in expression without proper context
2134
2134
Parameter to fetch isn't a dataset
2141
2141
Illegal combination of
modifers
The modifiers to attributes have an illegal combination. Duplicating
the same modifier is an example of illegal combination. Combining some
conflicted modifiers will be an error too, but will cause different errors
than this one (e.g., see Error C2142).
Solution: Remove any duplicated modifier. Example:
01: SHARED SHARED aa := 3;
Here two SHARED are used at the same time – an illegal combination.
Remove one of them.
2142
2142
EXPORT and SHARED cannot be specified
together
EXPORT and SHARED are both specified on an attribute, which is not
allowed.
Solution: Remove EXPORT or SHARED. Example:
01: SHARED EXPORT aa := 3;
02: EXPORT SHARED bb := 3;
Both lines specify SHARED and EXPORT at the same time.
2143
2143
Identifier XXX is already
defined
The identifier in question is already defined somewhere before. The
identifier can be an attribute name, a user-defined function name, a
user-defined macro name, etc. Functions, macros, and attributes all share
a name space. Therefore, an identifier that is used as a function name
cannot be used again in the same scope. See Scope rules in ECL for
information about scoping.
In ECL, an attribute can be defined only once in a given scope. Once
defined, we cannot rede- fine it again in the same scope. In this regard,
attributes are different from variables in the normal procedure
programming languages.
Solution: Choose another name, or make the conflicting names exist
in different scopes, if possible. Removing EXPORT or SHARED to changethe
scope level may make once-valid code invalid since EXPORT or SHARED
changes the scope of any local attributes before it.
Example:
01: attr := 4;
02: attr := 3;
03:
04: func(x) := x*2;
05: func(x) := x+2;
06:
07: macro1 := MACRO
08: 4
09: ENDMACRO;
10: macro1 := 2;
In the example, all identifiers in bold are already defined before
it.
2144
2144
Expression produces string field of unknown
length
The compiler cannot determine the size of a string field. This
normally is the result of some other ECL error that causes the compiler to
have trouble evaluating the size of a string. This error happens often in
RECORD definitions (and its IFBLOCK).
Solution: If the error happens in a RECORD definition, make sure the
field has a name, and a STRINGn type (STRING without a length cannot be
used, otherwise you get a C2043 error). The field can be anonymous only
if: (1) the data type is omitted, and (2) a dataset name is used as the
expression (which is used to include all the fields from the dataset at
their declared sizes and value types). For example:
aaa := DATASET(‘aaa’,{STRING1 f1, INTEGER1 f2}, FLAT); MyRec :=
RECORD
aaa;
STRING1 sex;
END;
This is equal to:
MyRec := RECORD STRING1 f1; INTEGER1 f2; STRING1 sex;
END;
Example:
01: STRING cat(STRING s1, STRING s2) := s1 + s2;
02:
03: MyRec := RECORD
04: cat(‘abc’,’def’);
05: END;
In line 4, no name is given to the to-be-defined field of MyRec. The
compiler tries to decide the type of the expression cat(‘abc’, ‘def ’) and
discovers it is STRING (with no specific length) from the definition the
cat function in line 1. Therefore you get this unknown size error. Giving
a name and a specific size type to the field solves the problem:
04: STRING6 magictag := cat(‘abc’,’def’);
Note that we also have to give a size explicitly to the STRING type
in the above code, otherwise, an error C2043 occurs.
2145
2145
Different character sets in
concatenation
The operands in string concatenation (+) have different character
sets. In ECL, we can use ASCII or EBCDIC charset. By default, a STRING is
ASCII. We can not concatenate an EB- CDIC string to an ASCII string (or
vice versa).
Solution: Concatenate an EBCDIC string and an ASCII string seldom
make sense. If you do want to do this, what you really want to do is to
change the code of one string so that the two strings have the same
charsets. An ECL function or service can be defined to accomplish this
task. There is no build in function or service to do this (AFAIK).
Example:
01: ASCII STRING3 x := ‘ABC’;
02: EBCDIC STRING4 y := ‘ABCD’;
03: STRING7 a := x + y;
Note that in line 3, y is not an ASCII string ‘ABCD’ since we are
defining it as an EBCDIC encoded string.
2146
2146
Type transfer: target type is larger than
source type
In a type transfer, the size of target type is larger the size of
source type.
ECL doesn’t allow this because it doesn’t know how to fill the extra
space in the target. However, it quietly accepts the other case: target
size is smaller than the source type in which case data is lost. It
assumes that the user doing the transfer knows what he is doing.
Type transfer in ECL can be done using the build-in function
TRANSFER or use the transfer operator: (>, <). They are
equivalent.
Solution: Make sure the size of the target type is equal to or less
than that of the source type. Example:
01: INTEGER2 x := 65;
02: STRING3 xstr1 := TRANSFER(x,STRING3);
03: STRING3 xstr2 := (>STRING3<)x;
In line 1, x is defined as INTEGER2 (which has size 2). In line 2
and 3, both target types are STRING3 (size=3). Line 2 and line 3 are doing
the same thing: one uses TRANSFER function, the other uses (>, <)
operator.
2147
2147
Illegal identifier XXX: $ is not allowed
2160
2160
SIZEOF requires a field or dataset
parameter
The build-in function SIZEOF only works with a field or DATASET. For
C programmers,
SIZEOF in ECL is different from the sizeof operator in C/C++, where
it can be used on a data
type or a variable.
Solution: Use SIZEOF only on a field or a dataset as required.
Example:
01: aaa := DATASET(‘aaa’, {STRING1 f1, STRING1 f2}, hole);
02: OUTPUT(aaa, {f1,SIZEOF(aaa),SIZEOF(f1)});
03:
04: INTEGER4 x := 3;
05: sizeOfInt := SIZEOF(x);
06: sizeOfInt4 := SIZEOF(INTEGER4);
In line 2, SIZEOF is on dataset aaa or field f1. Therefore, it is
OK. However, in lines 5 and 6, SIZEOF is on an attribute x and a data type
INTEGER4, which will causing this compile error.
2161
2161
Nested SORTs may behave incorrectly. Split the
attribute into two
Sort function calls are nested and may behave incorrectly. This is a
limit of the current implementation. In the future, this limitation may be
removed.
Solution: Split the attribute into two. Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa}, hole);
02: bbb := DATASET(‘bbb’, {STRING1 fb}, hole, aaa);
03: OUTPUT(SORT(aaa, SORT(bbb, fb)[1].fb));
The compiler complains on the second SORT in line 3. We can solve
the problem by splitting the attribute, like this:
01: aaa := DATASET(‘aaa’, {STRING1 fa}, hole);
02: bbb := DATASET(‘bbb’, {STRING1 fb}, hole, aaa);
03: temp := SORT(bbb, fb);
04: OUTPUT(SORT(aaa, temp[1].fb));
2162
2162
Nested GROUPs may behave incorrectly. Split
the attribute into two
Group function calls are nested and may behave incorrectly. This is
a limit of the current implementation. In the future, this limitation may
be removed.
Solution: Split the attribute into two. Example:
01: aaa := DATASET(‘aaa’, {STRING1 fa}, hole);
02: bbb := DATASET(‘bbb’, {STRING1 fb}, hole, aaa);
03: OUTPUT(GROUP(aaa, GROUP(bbb, fb)[1].fb));
The compiler complains on the second GROUP in line 3. We can solve
the problem by splitting the attribute, like this:
01: aaa := DATASET(‘aaa’, {STRING1 fa}, hole);
02: bbb := DATASET(‘bbb’, {STRING1 fb}, hole, aaa);
03: temp := GROUP(bbb, fb);
04: OUTPUT(GROUP(aaa, temp[1].fb));
2163
2163
Too many operands
This error happens in the ECL template commands. The command
expected a certain number of parameters, and the code supplies more than
it needs.
Solution: Reduce the number of parameters as required.
Example:
01: LOADXML(‘myxml.xml’);
02:
03: #DECLARE(S)
04:
05: #IF(S > 1, S < 5)
06: #ENDIF
07:
08: #SET (S, ‘1’, 2)
Both #IF and #SET need fewer parameters than they are
supplied.
2164
2164
No XML scope active
The current statement is legal only in an XML context. For example,
the template language is designed specifically for parsing XML code, and
therefore requires an active XML source.
Solution: Add an XML scope before the error (normally at the
beginning of the file) using LOADXML(xml-file-name).
Example:
01: #DECLARE(s)
We can simply add a dummy loadxml statement before line 1 to resolve
this error:
LOADXML(“myxml.xml”);
The content for this example is not important, but it is important
that the file does exist.
2165
2165
File extension must be
".HQL"
The file extension used to provide input for an application is
illegal. For example, Seisint’s internal test program hqltest requires the
.hql file extension on its input files.
Solution: Change the file extension to the one required for the
specific application. Example: N/A.
2166
2166
File XXX not found
A file is not found. This only happens with Seisint’s internal test
programs hqltest or ecltest.
Solution: Check the file name, and make sure the file exists in the
proper directory. If the path is relative, it is relative to the current
(working) directory.
2167
2167
Unknown identifier
The identifer is unknown for one of the following reasons:
• The identifier has been misspelled.
• The identifier names an attribute, function, dataset, or macro
defined in another module that has not been imported.
• The identifier is defined but it is not visible due to the scoping
rules of ECL. In particu- lar, the identifier is probably local (not
SHARED or EXPORTed), and there is an EX- PORT or SHARED attribute
defintion that terminates its scope.
• It is a field of a record, a dataset etc, and it is not properly
qualified.
Solution: First make sure it is spelled correctly. If it is defined
in other module, make sure it is properly imported and qualified. If it is
a field of some structure (like record, or table), qualify it properly
(such as: myrecord.field, mytable.field). If it is defined as a local
attribute to another SHARED and EXPORT attribute, either promote it to
SHARED or EXPORTed scope, or move the code around so that the identifier’s
defintion and the defintion using it are within the same local
scope.
Example:
01: a := f(x);
02: f(x) := x+3;
03: EXPORT y := 4;
04: a := f(y);
In line 1, f is not defined in this module. In line 4, f is alreaday
defined in line 2, but the scope of f in line 2 is terminated by the
EXPORT in line 3. Make f in line 2 SHARED or move line 2 after line 3 to
solve the problem.
2168
2168
Select a field other than these grouped upon
2169
2169
Aggregate field following a field that has a variable length
2170
2170
No default value for a field
A default value is required for some fields in a record. See example
for additional information.
Solution: Given a default value if proper. Most likely, a default
value is not what you need al- though it may solve the compiler error
problem.
Example:
01: bbb := DATASET(‘aaa’, {STRING1 fa; }, FLAT);
02: table1 := TABLE(bbb, {STRING1 fa; STRING1 fb; });
In this example, we create a table from dataset aaa. Since bbb has a
field called fa, we can have a value for field fa in the table. However,
there is no such field called fb in dataset bbb. Hence we get an error
saying that Field fb does not have default value. In this case, assign a
default value to fb.
2171
2171
Object has no such a field
2180
2180
Unknown escape sequence
Astring constant contains an unknown escape sequence. Currently, the
only supported escape sequences are:
\’ and \\
For C/C++/Java programmers, don’t assume that ECL supports the
standard escape sequences in these languages.
Solution: Remove the offending escape sequence. Example:
01: string x1 := ‘\r\n\t\b\x0123’;
None of the above C escape sequences is supported in ECL.
2181
2181
A string end with escape char \, eg., x :=
'abc\';
A string constant is terminated by a backslash (\). Most of the
time, the intention of the user is
to have a single quote (‘) as the last character in the string. As a
result, he/she puts an escape
character (\) in front of the single quote (‘) indicating the end of
the string constant and the
terminating quote is ignored.
Solution: Add another ‘ to terminate the string or remove the
offending \ whichever is proper. Example:
01: String s := ‘It is brothers\’;
The last character in this string is ‘, which has to be escaped as
\’, therefore we need another ‘ to terminate the string constant.
2182
2182
Illegal hex data, it can only have
0-9a-fA-F
Illegal characters are present in hex data. Hex data is defined
as:
X’hex-digits’ or x’hex-digits’
A hex digit may only be any of the numbers 0 through 9 or the
letters A through F (upper or lower case). The number of digits in the hex
string must be even (see Warning C1002) and be greater than 0 (see Warning
C1003).
Solution: Remove the illegal characters in the hex. Example:
01: DATA x1 := x’ABCX’;
02: DATA x2 := x’^1';
03: DATA x3 := x’A B’;
04: DATA x4 := x’\n’;
All bold chars are illegal hex digits (line 3 has a blank space
between A and B), therefore none of the above are legal hex data
strings.
2183
2183
Odd number of digits in hex data, e.g.,
x'ABC'.
In a hex data constant, the number of digits in the string must be
even because it takes two hex digits to define the value of a single byte
of data.
Solution: Check that there are no missing or extra digits. Add a
leading or trailing 0 as required. Example:
DATA d := x’ABCD123';
The hex data string x’ABCD123' contains 7 digits (an odd number).
Make it: x’0ABCD123'.
2184
2184
Empty hex data, e.g., "x".
The hex data cannot be empty.
Solution: Change it to meaningful, non-empty hex data.
Example:
DATA d = ‘’;
2185
2185
Comment is not started: ending is not allowed
2186
2186
Char XXX needs to be escaped
2187
2187
#ERROR statement
2190
2190
Empty record definition: no field
defined
In a record definition, no field is defined. This is not allowed in
ECL. For C/C++/Java programmers where empty structures (struct, class etc)
are allowed, note that this is not allowed in ECL.
Solution: Provide at least one field for the record. If you really
don’t need a real field, add a dummy field.
Example:
01: MyRec := RECORD
02: END
2191
2191
Empty substring range
The sub string expression is empty. In ECL, a sub string can
be:
• str [start_index .. end_index]
• str [ .. end_index]
• str [ start_index .. ]
• str [ one_index ]
Each index is an integer within the range of 1…LENGTH(str),
inclusive. Solution: Either provide an index value or remove the square
brackets. Example:
01: STRING s := ‘abc’;
02: STRING subs := s[];
2192
2192
Empty user type definition
The user type definition body is empty. In ECL, user types are
defined by the TYPE structure.
Solution: Provide at least one function for the defintion.
Example:
01: MyType := TYPE
02: END
2193
2193
Empty transform definition
The TRANSFORM definition body is empty. Since a RECORD type can not
be empty (see error C2190), and each record must be assigned a value in
the transform (see error C2111), an empty transform definition cannot be
legal.
Solution: Provide at least a trival SELF assignment. Example:
01: NamesRec := RECORD
02: STRING20 thename;
03: END;
04:
05: OutRec := RECORD
06: STRING20 thename;
07: END;
08:
09: OutRec Trans(NamesRec L, INTEGER C) :=
10: TRANSFORM
11: END;
Adding the following trival assignment definition in the TRANSFORM
will solve the problem:
SELF := L;
2194
2194
Unended comment
This error indicates that EOF was reached while a comment is not
ended. This only occurs to C- style comment: /* and */.
Solution: Add an ending */ in the proper position. Example:
01: a := 1;
02: /* this is a unended comment ..
The ending */ is missing in the above example.
2195
2195
Unended string constant: string must end in
one line
In ECL, a string constant must be complete in one line. The string
delimitor is single quote (‘). Note that ECL doesn’t support string
constants that span multiple lines. However, you can use the concatenation
operator (+) to reach the goal. Since constants are folded at compile
time, there is no performance penalty for this.
Solution: Add a single quote at the end to terminate the string.
Example:
01: STRING long_string := ‘the part on first line’
02: + ’the part on second line ‘
03: + ‘and the third line’;
04:
05: STRING s := ‘unended string const;
In line 1-3, we are defining a long string which spans multiple
lines. The string in line 5 doesn’t end with a single quote. Note that the
‘;’ is regarded as part of the string, and will not end the string
constant.
2196
2196
is illegal string delimiter: use '
instead
In ECL, the string constant delimiter is the single quote (‘)
character, not double quotes as in some other languages (C/C++/Java etc).
Since single quote is the delimiter, it needs to be escaped if it is part
of the string, like: ‘He\’s a nice guy’. And double quote does not need
(and cannot use) escape.
Solution: Change double quote to single quote
Example:
01: string s := “abc”;
2197
2197
Empty ifblock definition
2200
2200
EOF encountered inside #FOR
The File ends while we are examining a #FOR command. This usually
means the terminating
#END is missing.
Solution: Add #END if proper. Example:
01: loadxml(‘myxml.xml’);
02: #DECLARE (x)
03: #SET(x, 1)
04:
05: #FOR (x)
06: #APPEND(s, ‘1’)
2201
2201
EOF inside parameter
gathering
EOF is encountered when the parser is trying to gather parameters.
This normally occurs in a template command.
Solution: Make sure the ECL is complete. Example:
01: LOADXML(‘<xml>dummy</xml>’);
02: #IF(
The #IF doesn’t have a parameter yet.
2202
2202
Template symbol has already been
declared
In ECL template language, a symbol can only be declared once. You
get this error if you are trying to declare it a second time. Pay
attention to the scope rule. A symbol can be defined multiple times if it
belongs to different scope each time. However, if you change the scoping,
they may become within the same scope and therefore generate this
error.
Solution: Make sure to only declare each symbol once in the current
scope. Example:
01: LOADXML(‘<xml>x</xml>’);
02:
03: #DECLARE(s)
04:
05: #FOR(i)
06: #DECLARE(s)
07: #BREAK
08: #END
09:
10: #DECLARE(s)
Since #FOR will start a new local scope, the #DECLARE in line 6
doesn’t cause problem. However, line 10 does cause problem, because s is
already defined in line 3 (which is in the same scope).
2203
2203
Template symbol has not been
declared
In ECL template language, a symbol must be declared before it can be
used. A symbol is de-
clared using the #DECLARE command.
Solution: Make sure you declare it before you use it.
Example:
01: LOADXML(‘<xml></xml>’);
02: #SET(s, ‘abc’)
In line 2, s is not declared.
2204
2204
Can not find #end for XXX
#END is missing for a # command. In ECL template language, some
commands need a matching #END:
• #FOR
• #IF
• #IF #ELSE
• #LOOP
Solution: Add a matching #END. Example:
01: LOADXML(‘<xml></xml>’);
02: #FOR(i)
#END is needed for #FOR in line 2.
2205
2205
#ELSE does not match a #IF
#ELSE is not allowed outside a #IF structure. Note that #END will
end a #IF statement, and
#ELSE can no longer be used after the #IF structure is
terminated.
Solution: Ensure the #ELSE is inside your #IF. Example:
01: LOADXML(‘<xml>dummy</xml>’);
02:
03: #ELSE
04: #DECLARE(s)
05: #END
In line 3, #ELSE doesn’t match any #IF statement.
2206
2206
#END does not match a #
command
A #END is used only to match a # command. This error normally
happens if an extra #END
is used.
Solution: Make sure you use the proper number of #END.
Example:
01: LOADXML(‘<xml>dummy</xml>’);
02:
03: #IF(true)
04: #DECLARE(s)
05: #END
06: #END
The last #END (in line 6) is extra.
2207
2207
LoadXML failed
LoadXML() failed. The reason it failed can be:
• The xml file doesn’t exist
• The direct xml string is not well-formed.
• The xml in the xml file is not well-formed. LoadXML() function can
use a direct XML string, e.g.,
LoadXML(‘<xml>dummy</xml>’);
Or it can load from a file, e.g.,
LoadXML(‘myxml.xml’);
Solution: If it is a file, make sure the file exists, and you have
the proper permission. Also make sure the xml is well formed.
Example:
01: LOADXML(‘non-exist-xml.xml’);
If non-exist-xml.xml does not exist, such an error will
occur.
2208
2208
#BREAK is only allowed with a #FOR or
#LOOP
In ECL template language, #BREAK can only be used inside a #FOR or
#LOOP. Solution: Make sure it is the right context before you use
#BREAK.
Example:
01: LOADXML(‘<xml>dummy</xml>’);
02:
03: #IF (true)
04: #BREAK
05: #END
#BREAK cannot be used without #FOR or #LOOP in line 4.
2209
2209
#LOOP does not have a #BREAK: an infinite loop
will occur
In ECL template language, #LOOP is like a while(true) in C/C++. The
only way to break out
the loop is to use #BREAK. Therefore, a #LOOP without a #BREAK is an
infinite loop, and is
not allowed.
Note: The compiler uses a simple method to detect infinite loops.
Don’t depend on it to find infinite loops for you. For example:
01: #LOOP
02: #IF(false)
03: #BREAK
04: #END
05: #END
This example has a #BREAK inside the loop, however it is an infinite
loop. The compiler is not smart enough to figure out this. However,
another simple scheme is used to detect this. See Error C2210.
Solution: Use #BREAK to break out of the loop. Normally, #IF is
needed to break out of the loop conditionally.
Example:
01: LOADXML(‘<xml>dummy</xml>’);
02:
03: #LOOP
04: #END
Line 3 and 4 forms an infinite loop. Although it does nothing, it
will stuck the compiler if it fails to detect this.
2210
2210
Loops more than max times
This error detects more complicated infinite loops other than the
cases in error C2209. For each
#FOR or #LOOP, the compiler regards it as an infinite loop if it
runs more than the predefined max times. The max times is quite large, and
should be enough for normal situations.
Solution: Make sure it is not an infinite loop. If you are pretty
sure you get this error and think it is not an infinite loop (which may
never happen to you, just believe me), contact Seisint. We can increase
the constant or disable the check.
Example:
01: LOADXML(‘<xml></xml>’);
02:
03: #LOOP
04: #IF (false)
05: #BREAK
06: #END
07: #END
This example is trick code that is actually an infinite loop.
2211
2211
Unknown # command
2212
2212
Can not fold non pure function
2213
2213
Can not fold non c function
2214
2214
#ELIF does not match a #IF
2216
2216
Bad format for access token
2220
2220
No load function is defined
2221
2221
No store function is defined
2222
2222
No physical length function is defined
2223
2223
Inconsistent logical type
2224
2224
Inconsistent physical type
2225
2225
Store/Load/physicalLength(?) is not defined as func
2226
2226
physicalLength must have physical type
2230
2230
Function is already defined
2231
2231
Attribute is already defined
2232
2232
Invalid library entry
2233
2233
Invalid entrypoint: must be valid C identifier.
2234
2234
Function in service can not specify EXPORT or SHARED
2235
2235
Entrypoint is not defined, default to XXX
2236
2236
Invalid include entry
2237
2237
Serive does need a type
2238
2238
Conflicted attributes defined
2239
2239
Invalid initfunction: must be valid C identifier
2240
2240
Load library failed
2241
2241
Load procedure in library failed
2242
2242
library is not defined (it is an error in template)
2243
2243
Exception occurs when executing service function
2244
2244
Service can not have any parameter
2250
2250
LOADXML is not an attribute: it can only used alone for test
purpose
2251
2251
Invalid transform for ITERATE
2252
2252
Invalid transform for JOIN
2255
2255
expected a DATASET(...)
2256
2256
Only one arg supplied in record for INDEX
2257
2257
Parameter to STORED() should be a valid id
2260
2260
A field is mapped more than once
2261
2261
Dataset has no field as required or mapped
2262
2262
A map is not used
2263
2263
Mapping fields type mismatch
2280
2280
token used inside a token definition
2281
2281
Can't refer to a rule inside a pattern
2282
2282
Bad syntax inside a PATTERN() definition
2283
2283
expected pattern
2284
2284
Invalid format for an assertion subpattern
2285
2285
This expression can't be included in a pattern
2286
2286
Can't reference a pattern function in a MATCHED() arg
2287
2287
Self used outside a rule definition
2288
2288
Can only use use() inside a rule definition
2289
2289
:stored etc. used in a pattern attribute
2290
2290
2291
2291
Could not deduce feature from the guard condition
2292
2292
Expected a list of characters
2293
2293
Expected a repeat...
2294
2294
2295
2295
2296
2296
2297
2297
2299
2299
2300
2300
Multi dimension array indexing not supported.
2301
2301
Could not find distributed fields
2302
2302
Only LOCAL merge is currently supported
2303
2303
Field not found
2304
2304
Deprecated
2305
2305
KEYED index is invalid
2306
2306
2307
2307
2308
2308
2309
2309
2310
2310
2311
2311
No longer supported language feature
2312
2312
2313
2313
2314
2314
2315
2315
2316
2316
2317
2317
2318
2318
2319
2319
2320
2320
2321
2321
2322
2322
2323
2323
2324
2324
2325
2325
2326
2326
2327
2327
2328
2328
2329
2329
2331
2331
2332
2332
2333
2333
2334
2334
2335
2335
2336
2336
2337
2337
2338
2338
2339
2339
Feature not yet enabled on this platform
2340
2340
2341
2341
2342
2342
2343
2343
2344
2344
2345
2345
2346
2346
2347
2347
2348
2348
2349
2349
2350
2350
2351
2351
2352
2352
2353
2353
2354
2354
2355
2355
2356
2356
2357
2357
2358
2358
2359
2359
2360
2360
2361
2361
2362
2362
2363
2363
2364
2364
2365
2365
2366
2366
2367
2367
2368
2368
2369
2369
2370
2370
2371
2371
2372
2372
2373
2373
2374
2374
2375
2375
2376
2376
2377
2377
2378
2378
2379
2379
2380
2380
2381
2381
2382
2382
2383
2383
2384
2384
2385
2385
2386
2386
2387
2387
10000
10000
3000
3000
Internal exception
Most often this error indicates an internal error of the compiler (a
bug), but not always. Some- times, the message correctly reports a
problem. In an ideal world, this error should never hap- pen.
Solution: Try to work around the situation the message indicates.
Contact Seisint when no work- around is apparent.
3001
3001
Too many errors
Normally this means either the code is too complicated and has many
parsing errors, or the code’s logic confused the compiler, causing
cascaded errors.
Solution: Try to resolve the errors before this one first, and
hopefully there will be fewer errors next time. Comment out some code and
try to compile only a portion of the whole may be a good idea
sometimes.
3002
3002
Expected ...
Normally this indicates a general syntax error. The compiler gives
out the symbols it expects based on the grammar. This is the compiler’s
last resort for reporting meaningful error messages.
Solution: Try to understand the context and the ECL grammer. Don’t
take the error message too serious. It may be simply the result of some
error before this.
3003
3003
XXX is not valid here
Reference Errors C2020 through C2037; these are very similar.
3004
3004
Unexpected end of file
encountered
The ECL source file reaches the end while the parser is still in the
middle of something. This is normally the result of some other error. This
also happens during the error recovery produre.
Solution: Resolve other errors first, if any. Otherwise, look at the
code pointed out carefully. Try to identify problems. Is some structure
incomplete?
Example:
01: ReverseString4 := TYPE
02: MyType := TYPE
03: EXPORT INTEGER Load(INTEGER x) := x+1;
04: EXPORT INTEGER Store(INTEGER x) := x-1;
05: //END
06: //END
In the example, user defined types are not allowed to be nested (see
error C2011), so the parser is trying to recover from the error in lines
2-4, but couldn’t find the terminating END when it reached the end of the
file.
3005
3005
Whole record not valid here
3006
3006
Except not found in the incoming list
3007
3007
PIPE(name) and project not supported
3100
3100
Field removed from dedup could not be found
3101
3101
Module definition contain an illegal cycle/recursive definition
%s
3102
3102
Cannot calculate inversion of PROJECT on STEPPED index%s
3103
3103
Dataset not expected in this context
3104
3104
Equality on field[n..*] must match a similar equality
3105
3105
Join only supports a single x[n..*] comparison
3106
3106
INTERNAL: Serializing extract too complex
3107
3107
INTERNAL: Unexpected '%s' at %s(%d)
3108
3108
INTERNAL: Unexpected type '%s' at %s(%d)
3109
3109
Field '%s' in the map was not found in the dataset parameter
3110
3110
Field '%s' has already been mapped
3111
3111
A field named '%s' was not found in the dataset parameter
3112
3112
File %s not found
3113
3113
Browsing child grouped tables not handled at the moment
3114
3114
INTERNAL: Selected field '%s' does not appear in the dataset
3115
3115
Illegal pattern
3116
3116
Unknown character class [:%s:]
3117
3117
Collation symbols not yet supported
3118
3118
Equivalence class symbols not yet supported
3119
3119
Could not connect to any ECL server
3120
3120
Mismatch in major version number (%s v %s)
3121
3121
Virtual field %s not supported in constant table - please provide a
value
3122
3122
Inline DATASET field '%s' cannot be initialized with a list of
values
3123
3123
No value or default provided for field %s in inline table
3124
3124
Too many initializers (value %s) for inline dataset
definition
3125
3125
Initializer for field %s in inline dataset has the wrong type
3126
3126
Could not constant fold the condition on a IFBLOCK for a inline
table
Unknown_3005
Unknown_3005
The parser can not recover from previous error(s)
4000
4000
INTERNAL: Cannot generate code for an empty set in this
context
4001
4001
Multi dimensioned sets are not yet supported
4002
4002
ALL cannot be passed to an external service
4003
4003
Indexing ALL is undefined
4004
4004
Cannot use ALL in this context
4005
4005
Too many parameters passed to function '%s'
4006
4006
Cannot define column %s with an unknown length (use alien
datatype)
4007
4007
BUILDINDEX can only be used to build fixed width indexes
4008
4008
BUILDINDEX can only be used to build indexes on fixed width
files
4009
4009
INDEX does not support fields of type %s
4010
4010
INDEX does not match the dataset being joined
4011
4011
Join condition does not contain sufficient information to use
key
4012
4012
Not yet implemented: Cannot use a record structure containing a
virtual field (%s) with stored or persist
4013
4013
%s has more than one definition
4014
4014
LIMIT clause can only be applied to a dataset
4015
4015
Cannot resource activity %s a cluster with %d nodes
4016
4016
Unsupported option #WORKUNIT ('%s')
4017
4017
INTERNAL: Unsupported virtual attribute '%s'
4018
4018
Illegal pattern '%s..%s'
4020
4020
THOR must be used for sorting or joining datasets with variable
width rows
4021
4021
Substring index %d is outside the field range
4022
4022
RANK/RANKED not supported on list %s
4023
4023
Cannot cast a string of unknown length to another character
set
4024
4024
Not enough parameters passed to function '%s'
4025
4025
Index is not supported for type %s yet
4026
4026
RANK has no meaning on an empty list
4027
4027
%s can only be used in a record supplied to a PARSE() command
4028
4028
The parameter to MATCHED(%s) is not found in the pattern
4029
4029
Roxie requires constant filenames - expression %s cannot be computed
at deployment time
4030
4030
MATCHTEXT found where MATCHUNICODE was expected
4031
4031
MATCHUNICODE found where MATCHTEXT was expected
4032
4032
Only MATCHTEXT and MATCHUNICODE are valid inside a VALIDATE
4033
4033
Records containing child datasets must be output to a file
4034
4034
Definition of USE(%s) was not found
4035
4035
Definition of USE(%s.%s) was not found
4036
4036
Duplicate definition of %s (use #stored to override default
value)
4037
4037
ROWDIFF: Types are not compatible for field %s
4038
4038
FETCH not supported on dataset of kind %s
4039
4039
COUNTER is not legal in this context
4040
4040
XMLTEXT is only legal in a PARSE transform
4041
4041
XMLUNICODE is only legal inside a PARSE transform
4042
4042
Condition on DISTRIBUTE must match the key exactly
4043
4043
Row size %u exceeds the maximum specified (%u)
4044
4044
Select expression should have been hoisted
4045
4045
%s() cannot have a parameter inside a VALIDATE
4046
4046
%s is not supported in roxie queries
4047
4047
Input to MERGE does not appear to be sorted
4048
4048
Expression is too complicated to preload
4049
4049
KEYED(%s) couldn't be looked up in a key.
4050
4050
KEYED(%s) follows unfiltered component %s in the key%s
4051
4051
WILD(%s) follows unfiltered component %s in the key%s
4052
4052
%s could not be implemented by the key
4053
4053
Cannot process zero length rows
4054
4054
Set casts aren't supported yet
4055
4055
Cannot call function %s in a non-global context
4056
4056
Sets of items of unknown length are not yet supported!
4057
4057
#STORED (%s) type mismatch (was '%s' replacement '%s')
4058
4058
Cannot count number of elements in ALL
4059
4059
Can only key fixed fields at fixed offsets
4060
4060
Duplicate definition of %s with different type (use #stored to
override default value)
4061
4061
Features are not supported by regex - did you mean repeat() instead
of {}?
4062
4062
Option %s not yet supported on child datasets
4063
4063
Grouped tables not yet supported in this context
4064
4064
Nested child queries are not supported yet
4066
4066
#STORED (%s) records must match
4067
4067
ATMOST JOIN cannot be evaluated with this join condition%s
4068
4068
ATMOST JOIN cannot be evaluated with this join condition%s
4069
4069
RIGHT for a full keyed join must be a disk based DATASET
4070
4070
ATMOST(%s) failed to match part of the join condition
4071
4071
"LIMIT(%s, KEYED) could not be merged into an index read"
4072
4072
EXTEND is required on all outputs to NAMED(%s)
4073
4073
Duplicate output to NAMED(%s). EXTEND/OVERWRITE required
4074
4074
OUTPUTs to NAMED(%s) have incompatible types
4075
4075
OVERWRITE is required on all outputs to NAMED(%s)
4076
4076
OVERWRITE/EXTEND should be consistent on all outputs to
NAMED(%s)
4078
4078
Insufficient access rights to use embedded C++
4079
4079
Tag contents syntax <> is not supported by SOAPCALL
4081
4081
RIGHT side of a full keyed join must be a disk file
4082
4082
Expression is not constant: %s
4083
4083
"Unimplemented: Cannot access row blob inside a child query, contact
tech support"
4084
4084
Field '%s' with dataset type not supported in csv output
4085
4085
Field '%s' with set type not supported in csv output
4086
4086
Cannot determine the maximum size of the expression
4087
4087
Cannot determine size because variable size dataset is not in scope.
Try using sizeof(x,max)
4088
4088
Duplicate definition of %s
4089
4089
Duplicate definition of %s with different type
4090
4090
WILD() doesn't reference fields in key %s
4091
4091
Field %s cannot have both KEYED and KEYED,OPT conditions
4092
4092
KEYED(%s,OPT) follows a WILD() field in key %s
4093
4093
COUNT(,KEYED) cannot be used on a child dataset
4094
4094
Filter for COUNT(,KEYED) did not contained KEYED()
expressions
4095
4095
KEYED COUNT used on a non-keyable dataset
4096
4096
Attempting to lookup field %s in a dataset which has no active
element
4097
4097
Key condition (%s) is too complex, it cannot be done with the
key.
4098
4098
Key condition (%s) requires casts on comparison of field '%s'
4099
4099
Key condition (%s) does not have any comparisons against key
fields
4100
4100
No explicit maxlength provided for record %s
unary - cannot be performed on a string
4102
4102
%s is not supported inside NOTHOR()
4103
4103
Regular expression parsing doesn't support productions - need to use
tomita
4104
4104
Unimplemented: Cannot yet access $<n> inside a child
query
4105
4105
Ambiguous default production for rule with multiple inputs
4106
4106
Selector %s is used ambiguously at multiple levels
4107
4107
JOIN%s marked as KEYED does not have a key as the second
parameter
4108
4108
ALLNODES(dataset) only legal in roxie and in thor child
queries
4109
4109
ALLNODES() is not currently supported on grouped datasets
4110
4110
Library %s cannot contain any workflow actions%s
4111
4111
LOOP body too complicated to evaluate in parallel
4112
4112
Operator %s not supported inside DFAs
4113
4113
MATCHUTF8 found where MATCHUNICODE/MATCHTEXT was expected
4114
4114
THISNODE() can only be used inside ALLNODES()
4115
4115
STEPPED(%s) cannot be evaluated in this context
4116
4116
Parameter to RANGE() is too complex - not currently supported
4117
4117
Project of stepping fields is too complex
4118
4118
Stepped field %s must have a fixed size
4119
4119
Stepped field %s must be at a fixed offset
4120
4120
Expression is too complex to STEP (%s)
4121
4121
Cannot smart step on payload fields
4122
4122
STEPPED range condition could only be matched in one
direction
4123
4123
Multiple STEPPED comparisons %s >=
4124
4124
STEPPED condition is not compatible with the sort/merge condition
(%s expected)
4125
4125
JOIN condition is not compatible with the sort/merge
condition
4126
4126
STEPPED field %s is not keyed
4127
4127
STEPPED field %s does not follow the previous stepped field
4128
4128
Merge order must match all the stepped join fields
4129
4129
Cannot OR together conditions on multiple key fields (%s)
4130
4130
ROW compression can only be used on fixed size indexes
4131
4131
UPDATE cannot be used when the inputs names aren't globally
constant
4132
4132
THOR currently only supports LEFT OUTER denormalize
4133
4133
THOR doesn't support DENORMALIZE(%s)
4134
4134
SKIP cannot be used here. It is only valid directly with a
transform
4135
4135
Cannot read tables/datasets from a csv file
4136
4136
Argument %s to #workunit must be a constant
4137
4137
Argument %s to #debug must be a constant
Unknown_01
Unknown_01
Queries libraries must be implemented with a parameterised
module
4138
4138
Member %s not defined in module passed as library parameter
4139
4139
Member %s was undefined in a module
4140
4140
Thor does not support HAVING on a non-grouped dataset
4141
4141
%s not currently supported as a child action
4142
4142
Definitions in libraries cannot have side effects (%s)
4143
4143
4144
4144
4145
4145
Index read only supports single STEPPED expression
4146
4146
#%s (%s) creates an illegal recursive reference (%s also being
processed)
4147
4147
Insufficient access rights to use PIPE
4148
4148
Parameter to __nameof__ must be a dataset or an index
4149
4149
Expected a UPDATE attribute name
4150
4150
%s @ %d:%d
4152
4152
Index in RANK/RANKED is out of range
4153
4153
INTERNAL: Dataset is not active: '%s'
4154
4154
Could not open thor template '%s' at '%s'
4155
4155
Could not create output '%s'
4156
4156
Dataset '%.80s' does not contain expression '%.50s'
4157
4157
Cannot return a result of this type from a workunit
4158
4158
Could not find dataset %s
4159
4159
Could not find dataset %s (no tables in scope)
4160
4160
INTERNAL: Thor nodes should not be nested
4161
4161
INTERNAL: Missing assignment from transform to %s[%p]
4162
4162
"JOIN%s contains no equality conditions - use ,ALL to allow"
4163
4163
A global DEDUP(ALL) or local hash dedup cannot include comparisons
in the dedup criteria
4164
4164
"Global dedup,ALL must have a field to partition"
4165
4165
Hash dedup doesn't support %s
4166
4166
SORTED() used by JOINED must be applied to a DATASET
4167
4167
SORTED() used by JOINED must be applied to a THOR dataset
4168
4168
SORT supplied to COSORT needs to be executed at the same time
4169
4169
WAIT not yet supported
4170
4170
Index has fields %s in scope
4171
4171
Global dataset has fields %s in scope
4172
4172
Create resource library %s failed
4173
4173
Records not assignment compatible
4174
4174
Missing end of placeholder
4175
4175
%s can only be globally or inside ONFAIL or other failure
processing
4176
4176
Side-effect%s is not currently supported as a context-dependent
dependency
4177
4177
Cannot deduce MERGE transform for global AGGREGATE
4178
4178
AGGREGATE does not include grouping field '%s' in the result
record
4179
4179
The calculated maximum row size has overflowed 32bits
4180
4180
%s: %s cannot be dependent on the dataset
4181
4181
Cannot determine the minimum size of the expression
4182
4182
%s used outside of a TABLE aggregation
4183
4183
%s resource added after manifest was finalized
4184
4184
SKIP inside a ROW(<transform>) not supported. It is only
allowed in a DATASET transform.
4500
4500
4501
4501
4502
4502
4503
4503
4504
4504
4505
4505
4506
4506
4507
4507
4508
4508
4509
4509
4510
4510
4512
4512
4513
4513
4515
4515
4516
4516
4517
4517
4518
4518
4519
4519
4520
4520
4521
4521
4522
4522
4523
4523
4524
4524
4525
4525
4526
4526
4527
4527
4528
4528
4529
4529
4530
4530
4531
4531
4532
4532
4533
4533
4534
4534
4535
4535
4536
4536
4537
4537
4538
4538
4539
4539
4540
4540
4601
4601
Rank/Ranked not supported on variable length strings
4604
4604
DISTRIBUTION() only supported at the outer level
4606
4606
Physical table join condition too complicated
4609
4609
Arbitrary repeats not yet supported!
4610
4610
Tomita doesn't yet support unicode
4611
4611
Patterns are too complicated for Tomita to handle at the moment
[%s]
4613
4613
Cannot currently assign to DATASET(SIZEOF(x)) fields
4614
4614
Can only normalize simple child datasets - use other form if more
complicated
4615
4615
ROXIE doesn't yet support local activities
4616
4616
4617
4617
STEPPED is not currently supported by thor
Unknown_02
Unknown_02
string[n..*] syntax is only valid in a join condition
Unknown_03
Unknown_03
Keyed distribute doesn' support join condition of the form
field[n..*]
4618
4618
ONCE workflow items cannot be dependent on other workflow items
(including ONCE)
4619
4619
Thor currently only supports the local version of COMBINE
4799
4799
4800
4800
INTERNAL: Clear not supported on LOCAL datasets
4801
4801
INTERNAL: Local datasets cannot be created
4802
4802
INTERNAL: Attempt to access dataset outside of Thor
4803
4803
INTERNAL: Not all Transform targets were assigned to [%s]
4804
4804
INTERNAL: Cannot access stored variable %s in this context
4805
4805
INTERNAL: Evaluate table is not in scope
4806
4806
INTERNAL: Internal function %s not found
4807
4807
INTERNAL: OUTPUT() on a scalar not processed correctly
4808
4808
INTERNAL: Expression too complex - cannot create a DFA
4809
4809
INTERNAL: Unsupported inline query
4813
4813
INTERNAL: Could not resolve file position
4814
4814
INTERNAL: Cannot perform type cast from %s to %s
4815
4815
INTERNAL: Could not find context to evaluate match expression
4816
4816
INTERNAL: Blob translation context not found
4817
4817
INTERNAL: ROWS can not be evaluated in this context
4818
4818
INTERNAL: Expected a parent/container context. Likely to be caused
by executing something invalid inside a NOTHOR.
4820
4820
INTERNAL: Could not resolve COUNTER for inline count project
4821
4821
INTERNAL: Graph context not found
4822
4822
INTERNAL: Accessing unserialized stored variable %s in slave
context
4823
4823
INTERNAL: Library '%s' shouldn't access work unit temporary
'%s'
4824
4824
INTERNAL: Library '%s' shouldn't create work unit temporary
'%s'
4825
4825
INTERNAL: Attempting to access graph output directly from a child
query
4826
4826
INTERNAL: Inconsistent activity localisation (child %d:graph
%d)
4827
4827
INTERNAL: No active parent extract - activity has incorrect
localisation?
4828
4828
4829
4829
INTERNAL: Inputs to nary operation have inconsistent record
structures
4830
4830
INTERNAL: Linked child rows required without legal context
available
4833
4833
4834
4834
INTERNAL: Cannot generated serialized compare function
4835
4835
INTERNAL: Attempt to read spill file %s before it is written
4836
4836
INTERNAL: Dependency within a graph incorrectly generated for hThor
(%u)
4837
4837
INTERNAL: Unrecognised compound assign %s