filename my_data_file 'c:\desktop\myfile.dat' Data work.my_data_file; infile my_data_file; input @1 id $6. @5 create_date mmddyy10.0 @9 amount 8.2 run; proc print data=my_data_file; run; |
Input | Informat | Output | Description |
---|---|---|---|
08/11/2003 | mmddyyyy10.0 | 15928 | The number of days since YEARCUTOFF option (yearcutoff=1920) |
$13,203 | Comma10.2 | 13203.00 | Drops dollar sign and commas |
12345 | $CHAR6. | 12345 | The value will store leading blanks if they exist |
12345 | $6. | 12345 | Numeric value 6 characters long, no decimal places |
1327034.13 | Dollar10.2 | $1,327,034.13 | Adds dollar sign and commas |
0000012345 | z10. | 0000012345 | Keeps leading zeros |
Kevin Regan
Have an article, idea, found a typo, want to contribute? Shoot me an email
Here
Below are links to some Udemy Data Science Courses. I've been using Udemy for a number of years now, and I've found their courses super helpful, maybe you will also.