Compilation errors

Lycia compiler reports the errors in the source code to the 4gl developer. There are several types of errors, the most common of them being syntax and logical ones.

The table below includes only the most frequent compilation errors.

If you have encountered an error and it is not in this list, you may contact support@querix.com for a detailed information.

Error code

Error type

Displayed message

Example of the erroneous 4gl code

-101005

logical

The specified variable is not defined in this context. Check that it is spelled correctly and that its DEFINE statement is formatted correctly.

FUNCTION f()

LET a = 1

END FUNCTION

-101006

logical

A RECORD variable is required to perform the operation you have requested. For example, if you have written myfield.*, myfield must be a record.

MAIN

DEFINE a INT

DISPLAY a.*

END MAIN

-101007

syntax,

logical

The specified field does not appear to exist in the record. Check the record definition to ensure that the field is spelled correctly. If the record is declared "LIKE" a database table, check the database to ensure that the column exists in the database table.

MAIN

DEFINE r1 RECORD

  f1 INT,

  f2 CHAR(32)

END RECORD

LET r1.f3 = 3

END MAIN

-101008

logical

An array-type variable is required to perform the operation you have requested. For example, if you have written myarray[10], it must be declared as a 4gl ARRAY.

MAIN

DEFINE f FLOAT

LET f[1] = 1

END MAIN

-101013

logical

A variable is being defined like the specified table but Lycia cannot find this table in the database. Check the table exists and, that a DATABASE statement corresponding to this database appears outside of any functions, reports or main blocks.

DATABASE auth

MAIN

DEFINE r LIKE unknown_table.*

END MAIN

-101014

logical

A variable is being defined like the specified column but Lycia cannot find this column in the database. Check the table and column exist and, that a DATABASE statement corresponding to this database appears outside of any functions, reports or main blocks.

DATABASE auth

MAIN

  DEFINE r LIKE unknown_table.unknown_field

END MAIN

-101016

logical

The specified array size is not a positive INTEGER.

DEFINE a ARRAY[0] OF INT

-101020

syntax

(4gl does not allow this)

A qualifier specified for a datetime or interval is not valid.

MAIN

DEFINE intr INTERVAL YEAR TO DAY

END MAIN

-101037

syntax

The specified data type does not correspond to a 4gl data type or any user-defined type. Check the typename to ensure, that it is spelled correctly.

MAIN

DEFINE a SOMEUNKNOWNTYPE

END MAIN

-101039

syntax

You have declared a menu, but do not appear to have any COMMAND statements. Check the menu declaration to ensure that there is at least one COMMAND statement associated with it.

MAIN

MENU

END MENU

END MAIN

-101041

logical

The left hand and right hand sides of the THRU statement do not appear to have any common ancestors. In order to use THRU, the left hand and right hand sides must both be within the same record: myrec.f1 THRU myrec.f5, myrec.subrec.fld1 THRU myrec.subrec.fld3, and myrec.f2 THRU myrec.subrec.fld1 are both valid, but myrec.f1 THRU otherrec.f5 is not.

MAIN

DEFINE a ARRAY[4] OF INT

DISPLAY a[1] THRU a[4]

END MAIN

-101046

logical

(aggregate function can be used only inside the SqlStmts)

Lycia does not know how to create an aggregate from the specified function, or an aggregate function is not within a report event block.

MAIN

CALL COUNT(*)

END MAIN

-101049

syntax

RUN statements can either specify WITHOUT WAITING or RETURNING but not both.

WITHOUT WAITING indicates that the call should return immediately without waiting for the process to terminate, RETURNING indicates that you wish to know the return code of the process.

You cannot get the exit code if you do not wait for the process to exit.

MAIN

DEFINE a INT

RUN "cmd.exe" WITHOUT WAITING RETURNING a

END MAIN

-101051

syntax

The between operator must be followed by an expression of the for X AND Y.

DATABASE auth

MAIN

DEFINE a INT

SELECT col_1{int} FROM tab_test   WHERE

         col_1 BETWEEN 1 OR 2

END MAIN

-101056

syntax

(RDBMS restriction)

The select statement is invalid.

DATABASE auth

MAIN

SELECT * FROM customer INTO TEMP

        cust_user UNION SELECT * FROM users

END MAIN

(Only the formed data sets can be put to temp. )

-101057

logical

You have used a SELECT statement in the context of a value outside of an SQL statement.

For

LET val = SELECT something FROM mytable

or

RETURN SELECT something FROM mytable).

Lycia cannot currently perform this operation.

This error may occur when a statement which takes an optional argument (such as RETURN) is followed by a SELECT statement. You can prevent it by adding a ";" symbol to the end of the first statement.

DATABASE auth

MAIN

DEFINE a INT

LET a = SELECT col_1 FROM tab_test WHERE col_2 = "somevalue"

END MAIN

-101060

logical

An attempt has been made to use both SQL variable placeholders (?) and program variables in the same statement:

DEFINE myval integer

DECLARE mycrs CURSOR FOR SELECT * from mytable where mytable.col1 = myval and mytable.col2 = ?

You must use either "?" placeholders (in which case the parameters must be supplied when the cursor is opened), or program variables.

DATABASE auth

MAIN

DEFINE str CHAR(32)

LET str = "something"

DECLARE mycrs CURSOR FOR

SELECT * from tab_test WHERE

         tab_test.col_1 = ? and

         tab_test.col_2 = str

END MAIN

-101062

logical

You cannot use SQL placeholders in an inline SQL statement, since the compiler needs to know the values to assign to the placeholders in order to execute the statement.

DATABASE auth

MAIN

SELECT * FROM tab_test WHERE col_1 = ?

END MAIN

-101067

logical

The specified array dimensions is not a positive INTEGER.

DATABASE auth

MAIN

DEFINE darr1 DYNAMIC ARRAY WITH -1

         DIMENSIONS OF INTEGER

END MAIN

-101068

logical

The specified field has already been defined in this RECORD.

MAIN

DEFINE a RECORD

   f1 INT,

   f1 CHAR(32)

END RECORD

END MAIN

-101069

syntax

Variables of the RECORDdata type cannot be referenced in the current context. To use a RECORD variable in the current context, it must be expanded with the '.*' syntax.

FUNCTION f(r)

DEFINE r RECORD

   field1 INT,

   field2 CHAR(32)

END RECORD

RETURN r

END FUNCTION

-105066

license

Not enough license seats for Lycia Compiler service.

Your license does not have any available Lycia Compiler seats. This may happen because all the seats are occupied, your license does not include the seats of the required type or your license has expired.

To free the seats, terminate the processes which occupies them (e.g., close a running 4GL program to free a Lycia runtime seat).

Contact Querix support team (support@querix.com) to add new seats to your license or to renew the license.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.