>how to find the datatype of a parameter in a function
>
>
> i used type() function , but it takes only character expression as argument . if the parameter passed is numeric then type mismatch occurs , if the parameter is string if I use type(str()) then type mismatch occurs but solves the numeric parameter.
>
> any advice or suggestion would be very helpful.
Staya,
You have to put the expression in quotes for the TYPE() function.
lcVar = "lcVar2"
lcVar2 = 123
?TYPE(lcVar) && returns N becuase lcVar2 is numeric
?TYPE("lcVar") && Returns C because lcVar is character.