Gen numeric field generation of long and double

Document ID : KB000095456
Last Modified Date : 10/05/2018
Show Technical Document Details
Can you influence or change the generated outcome of a Gen numeric attribute in C regarding 'double' or 'long' data type?  If I have an attribute within an entity defined as Numeric (length 9), when generating the Action Block that contains the attribute, the attribute in generated in C as a 'long' data type. When the attribute is increased in length within the model to Numeric (length 10), and the Action Block containing the attribute is generated in C, it is defined as a 'double' data type.   Is there any way to influence the generation process in Gen, so that the data item type for the above numeric example continues to be generated as a ‘long’ rather than a ‘double’ data type?  

There is no way to change the generation process, once you go beyond Numeric (length 9), the attribute is going to be generated as a 'double' data type, and if lower than Numeric (length 10) it will be generated in C as a 'long' data type.

This is documented in our Gen documentation.  See the Gen docops and search on 'double' at the following location:

The only related property to influence the generated outcome in Gen targeting C, of numeric fields, is the decimal precision property for a numeric attribute.  However, this parameter does not influence 'long' versus 'double' data type on a numeric >9 in length.