Skip to content

Data Types

Daniel Long edited this page Sep 24, 2026 · 2 revisions

Data Types

RPG Type Example Description
CHAR(n) DCL-S x CHAR(10); Fixed-length string
VARCHAR(n) DCL-S x VARCHAR(50); Variable-length string
INT(10) DCL-S x INT(10); 32-bit integer
INT(20) DCL-S x INT(20); 64-bit integer
UNS(10) DCL-S x UNS(10); Unsigned 32-bit integer
PACKED(n:d) DCL-S x PACKED(9:2); Packed decimal (stored as double)
ZONED(n:d) DCL-S x ZONED(9:2); Zoned decimal (stored as double)
FLOAT(4) DCL-S x FLOAT(4); Single-precision float
FLOAT(8) DCL-S x FLOAT(8); Double-precision float
IND DCL-S x IND; Boolean indicator
DATE DCL-S x DATE; Date value
TIME DCL-S x TIME; Time value
TIMESTAMP DCL-S x TIMESTAMP; Timestamp value
POINTER DCL-S x POINTER; Memory pointer

Clone this wiki locally