This is my code;
Data NewClams_2010_2013;
Set tca.claims_2010_2013;
NewClaimNumber=input(Claim_Number, 15.);
run;
But, still the format is Chat.
I have attached the file.
Hi @dooheekim01 Claim_Number is ought to be character as that is the variable being read. However , check your NewClaimNumber. This should be numeric
Remember, you can't change the metadata i.e. data type of a variable from a dataset that is being read. You are basically assigning its values to a new numeric variable.
Thank you.
Unless you are doing calculations on claim number it is best left as character to avoid numeric precision problems. Please be aware that SAS numbers can only hold at most 15 digits accurately so you are right on the border of introducing precision errors.
I'd keep claim_number as character for the reasons @SASKiwi explained.
But "just for fun" and using your code here how you could get to a numerical variable claim_number.
Data NewClams_2010_2013;
Set tca.claims_2010_2013;
NewClaimNumber=input(Claim_Number, 15.);
drop Claim_Number;
rename NewClaimNumber=Claim_Number;
run;
You've circled the wrong variable.
You named the new numeric variable NewClaimNumber which is at the bottom of the list of variables as numeric.
@dooheekim01 wrote:
This is my code;
Data NewClams_2010_2013;
Set tca.claims_2010_2013;
NewClaimNumber=input(Claim_Number, 15.);
run;
But, still the format is Chat.
I have attached the file.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.