Checking Syntax

The pre-compiler supports both relaxed and strict syntax checking. You indicate relaxed checking with the -Pr command line option, strict checking by not including this option. See Using AcuSQL as a Standalone Program for information on the -Pr option. These choices operate on the entire source code file.

However, you may prefer to exercise strict checking in some parts of your program and relaxed checking in others. You can indicate the mode of syntax checking by indicating Relaxed or Strict with your EXEC ESQL command.

For example,

EXEC SQL RELAXED
    DECLARE COBCUR1 FOR
    SELECT
        C_NUMBER, C_NAME, TO_CHAR(C_BIRTHDAY, 'DD-MM-YY'), C_INFO
        FROM CUSTOMER
        WHERE C_NUMBER >= :C_NUMBER
END-EXEC.

or

EXEC SQL STRICT
    DECLARE COBCUR1 FOR
        SELECT
            C_NUMBER, C_NAME, TO_CHAR(C_BIRTHDAY, 'DD-MM-YY'), C_INFO
        FROM CUSTOMER
        WHERE C_NUMBER >= :C_NUMBER
END-EXEC.

See Working With More Than One Row – select3.sqb for a description of this code.

Note that you cannot indicate Relaxed or Strict in the following instances: