Hi Experts Good Morning
Here my dataset in this dataset input numbers using dollar sign data read like below without dollar sign missing
i want output
data dsn; input numbers $ 7. @@ ; datalines; 1,22, 6, 55,668 ,77 47 , 3, 55 98,66 run;
data dsn; input numbers $20.; datalines; 1,22, 6, 55,668 ,77 47 , 3, 55 98,66 run;
View solution in original post
HI Draycut
i got solution thank you
i have doubt why should we use dollar sign even though it is numeric data
could you please clarify
You should show examples of the actual file that was read and ideally the code used to read the data.
Also you should show what you expect the results to look like.
If you want to display numeric values as currency then the display format DOLLAR should be used.
Example;
data example; input x; put x Dollar16.2; datalines; 123.45 0.57 123456789.89 ;
The example code provided by @PeterClemmensen reads values as character.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Latest Updates
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.