BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sonic_poem
Calcite | Level 5

Hi,

 

I inherited a program containing macro codes and saw the log message below. Can you help troubleshoot what the issue is regarding the following codes?

	data _null_;
		set test8 end=eof;
		call symputx('Product'||left(_n_), product, 'G');
		call symputx('Environment'||left(_n_), environment, 'G');
		if eof then call symputx('numrows',_n_, 'G');
	run;

NOTE: Numeric values have been converted to character values at the places given by:
(Line) : (Column).
1463:35 1464:35

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
call symputx(  cats('Product',_n_)   , product, 'G');

View solution in original post

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

This happens because the Left Function requires a character string. If the argument is numeric, the function attempts to convert it to character before left aligning. The code below gives the same Note. Probably nothing no worry about.

 

 

data test;
   set sashelp.class;
   a=left(_n_);
run;

 

 

tomrvincent
Rhodochrosite | Level 12
display product and system from test8...are they numeric?
comment out lines 3-5, run, then uncomment one at a time to figure out where the error is.
Ksharp
Super User
call symputx(  cats('Product',_n_)   , product, 'G');
sonic_poem
Calcite | Level 5

Thank you! It worked!!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 476 views
  • 2 likes
  • 4 in conversation