DATATYPE Function -- Syntax and Examples

DATATYPE(string[, type])

datatype("This String","A")

returns a "1" (true) because the string evaluates as Alphanumeric

datatype("This String",":N")

returns a "0" (false) because the string does not evaluate as Numeric


retuns "NUM" because the string is a valid REXX number

DataTest = datatype("This String")

assigns the value "CHAR" to the variable DataTest