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

Hi I am trying to convert character value to numeric used. this codes

data datachek.mil_lab_2017_A;
set datachek.MIL_LAB_2017;
AZIMICDD = INPUT(AZI_MIC_DD, BEST8.);
DROP AZI_MIC_DD;
RENAME AZIMICDD=AZI_MIC_DD;
RUN;

 

log did not show any error

51 data datachek.mil_lab_2017_A;
52 set datachek.MIL_LAB_2017;
56 AZIMICDD = INPUT(AZI_MIC_DD, BEST8.);
57 DROP AZI_MIC_DD;
58 RENAME AZIMICDD=AZI_MIC_DD;
59 RUN;

NOTE: There were 2406 observations read from the data set DATACHEK.MIL_LAB_2017.
NOTE: The data set DATACHEK.MIL_LAB_2017_A has 2406 observations and 30 variables.
NOTE: DATA statement used (Total process time):
real time 0.12 seconds
cpu time 0.03 seconds

 

but the converted data has . value no numbers.  Can some tell me why and how can i fix this. Also can I convert from character to numeric and change the length of the variable at once? 

I would be so grateful of your help?

 

I have several variables value that need to be converted from character to numeric, how can i do it once?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16

Could you please check if there is any missing character data. Because the missing character data when converted to numeric take dot value. it is representation of missing numeric data in SAS. 

Thanks,
Jag

View solution in original post

1 REPLY 1
Jagadishkatam
Amethyst | Level 16

Could you please check if there is any missing character data. Because the missing character data when converted to numeric take dot value. it is representation of missing numeric data in SAS. 

Thanks,
Jag

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
  • 1 reply
  • 565 views
  • 0 likes
  • 2 in conversation