data work.input; input Deposit Amount; datalines; 1 10,000.00 2 $3.4k 3 $9.3e3 4 $7500 ; data work.output; set work.input; Num_Amout=input(amount,comma9.); run; What output will be created by this program, Deposit and amount are character variable?
Then apply Maxim 2 (Read the Log), and then Maxim 3 (Know Your Data). Inspect the columns in the data grid, or run a proc contents.
You will note that your first step results in missing values only for amount because you have 4 different ways of providing numeric data, all 4 of which are not covered by the default informat for numbers.
So you'll probably end up with reading that column as character and then doing a conditional conversion, depending on certain markers found in the string.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.