In a SAS dataset, the information stored in a variable is classified only into two types.
Based on the context of usage of a particular variable in an expression or statement, SAS expects a variable of specific data type. For example, if we are trying to apply strip function on a variable, it expects the data to be of character type and if we are trying to add or multiply a constant to a variable, it expects the variable to be of numeric type.
If we use a variable of incorrect data type in an expression or statement, SAS tries to automatically convert the data type of the variable before using it in the expression or statement and writes a note to the log file indicating that SAS has attempted an automatic conversion.
We can use PUT and INPUT functions to explicitly convert the data type of a variable before using it in an expression or statement.