proc sql;
create table final_data_set as
select field_name
, value1
from HSD.types_OfAttempts
UNION ALL
select put(field_name, Z3.)
, value1
from HSD.number_attempts
UNION ALL
select put(field_name, Z3.)
, value1
from HSD.final_timeframes
;
quit;
The first dataset has field_name as character. It has types of attempts made like phone, email, face2face.
The last two datasets have field_name as numeric.
ERROR: Numeric format Z in PUT function requires a numeric argument.
Well, your error message contradicts your statements regarding the variable type.
Review the proc contents output of each of your three datasets and modify your code accordingly.
If that still does not work, post the results of your proc contents.
Well, your error message contradicts your statements regarding the variable type.
Review the proc contents output of each of your three datasets and modify your code accordingly.
If that still does not work, post the results of your proc contents.
I figured it was a silly mistake.
I did a proc contents and matched the variable type 🙂
Thanks so much guys.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.