The internal representation of a field of any of the fixed-point numeric types is the same as an integer representation, even when you specify a decimal point. The representation of 12.34 is the same as that of 1234, for example. Similarly, currency symbols are not stored with fields of type MONEY.
When you interact with DB2® (directly or by way of JDBC) , the maximum number of digits in a fixed-point number is 31 at most.
A variable of type ANY receives the type of the value that is assigned to that variable, as described in the topic ANY.
Each primitive type is described on a separate page; and additional details are available on the pages that cover assignments, logical expressions, function invocations, and the call statement.
DataItem myItem CHAR(4) end Record mySerialRecordPart type serialRecord { fileName="myFile" } 10 name CHAR(20); 10 address; 20 street01 CHAR(20); 20 street02 CHAR(20); end
EGL supports the types DECIMAL, NUM, NUMC, and PACF so you can work more easily with files and databases that are used by legacy applications. It is recommended that you use fields of type BIN in new development or that you use an equivalent integer type (BIGINT, INT, or SMALLINT); calculations are most efficient with fields of those types. You get the greatest efficiency by using fields of type BIN, length 2, and no decimal places (the equivalent of type SMALLINT).
In calculations, assignments, and comparisons, fields that are of type NUM and have no decimal places are more efficient than fields that are of type NUM and have decimal places.
Calculations with fields of types DECIMAL, NUM, NUMC, and PACF are equally efficient.
Related concepts
DataItem part
Record parts
References to variables in EGL
Fixed structure
Related reference
ANY
Assignments
BIN and the integer types
call
CHAR
DATE
DBCHAR
DECIMAL
Exception handling
FLOAT
Function invocations
HEX
INTERVAL
Logical expressions
MBCHAR
MONEY
NUM
NUMC
Numeric expressions
Operators and precedence
PACF
SMALLFLOAT
SQL item properties
STRING
Text expressions
TIME
TIMESTAMP
UNICODE