Command tools changes
Modifications to consider regarding command line tools.
This topic describes changes that may need code review.
See also new 6.00 features of commands.
Compilation error on comparing different record types
DEFINE r1 RECORD
id INTEGER, name VARCHAR(50)
END RECORD
DEFINE r2 RECORD
id INTEGER, name VARCHAR(100)
END RECORD
MAIN
IF r1.* == r2.* THEN
DISPLAY "Identical"
END IF
END MAIN$ fglcomp -M main.4gl
main.4gl:8:8:8:19:error:(-8442) Incompatible types: 'RECORD <anonymous>'
and 'RECORD <anonymous>' are not comparable.[DESCRIBE] DATABASE detected by -W stdsql
Starting with version 6.00.03, the fglcomp -W
stdsql warning option now detects old legacy [DESCRIBE] DATABASE
instructions specifying a .sch database schema for DEFINE … LIKE
… instructions.
When [DESCRIBE] DATABASE is used in the module containing the
MAIN block, an implicit database connection is performed at runtime when the
MAIN block is executed. This can lead to runtime errors, when deploying your
application code on a production server where the database name used in [DESCRIBE]
DATABASE does not exist.
Since early versions of Genero BDL, it is recommended to specify the database schema with the
SCHEMA instruction, which does not do an implicit database connection in
MAIN.
Read SCHEMA for more details.
Compiler warning for risky SQL cursor usage
DECLARE c CURSORwith host variables orINTOvariables having local function scope, and one of the following statements is used outside the scope of the function:OPEN,FETCH,FOREACH,PUTwithout aUSING,INTOorFROMclause to re-bind local variablesOPEN c USINGfollowed byOPENorFOREACHwithoutUSINGclause, (Informix OPTOFC usage)
Read Using program variables in static SQL for more details.
Changes in earlier versions
Make sure to check the upgrade notes of earlier versions, to not miss changes introduced in maintenance releases.