#GETDATATYPE

#GETDATATYPE( field );

fieldA previously defined user-defined symbol containing the name of a field in a dataset..

The #GETDATATYPE function returns the value type of the field. The field argument must be a scalar value or a field from a dataset (rather than a field from a record definition.)

Example:

person := DATASET([{D'6789ABCDE6789ABCDE'}],{DATA9 per_cid});
#DECLARE(fieldtype);
#DECLARE(field);
#SET(field, 'person.per_cid');
#SET(fieldtype, #GETDATATYPE(%field%));
res := %'fieldtype'%;
OUTPUT(res); //  'data9'

See Also: Value Types