BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ashwini2
Fluorite | Level 6
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.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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.

 

 

 

 

 

 

View solution in original post

3 REPLIES 3
Reeza
Super User

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.

 

 

 

 

 

 

ashwini2
Fluorite | Level 6

I figured it was a silly mistake.

I did a proc contents and matched the variable type 🙂

Thanks so much guys.

Haris
Lapis Lazuli | Level 10
Check that your Field_Name variables in the second and third datasets are in fact numeric. Alternatively, you can have this error if you misspell the dataset name and the variable is not found.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 959 views
  • 1 like
  • 3 in conversation