The value of SQLLEN depends on the data type of the columns. SQLLEN gives the length of data (in bytes), depending on data type.
| Data Type | SQLLEN Value for DESCRIBE | SQLLEN Value for FETCH, OPEN and EXECUTE | 
|---|---|---|
| date 
                               (See note 1.)  | 
                           
                           10 bytes | length attribute of the host variable | 
| time 
                               (See note 1.)  | 
                           
                           8 bytes | length attribute of host variable | 
| timestamp 
                               (See note 1.)  | 
                           
                           26 bytes | length attribute of the host variable | 
| character strings 
                               - varying-length - fixed-length - long varying-length  | 
                           
                           length attribute of the column | length attribute of the host variable | 
| graphic strings 
                               - varying-length - fixed length - long varying-length (See note 2.)  | 
                           
                           length attribute of the column | length attribute of the host variable | 
| floating point | 4 for single precision 
                               8 for double precision  | 
                           
                           4 for single precision 
                               8 for double precision  | 
                           
                        
| packed decimal | precision in byte 1 
                               scale in byte 2  | 
                           
                           precision in byte 1 
                               scale in byte 2  | 
                           
                        
| integer | 4 bytes | 4 bytes | 
| small integer | 2 bytes | 2 bytes | 
Table Notes: