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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 993 views
  • 1 like
  • 3 in conversation