I am inputting a .dat data set into sas, in an exercise teaching informat use. Here is what I have so far.
DATA companies;
INFILE "/folders/myshortcuts/Stat324/BigCompanies.dat" encoding='wlatin2';
INPUT rank 3. @6 company $UTF8X25. @35 country $17. @53 sales comma6. @60 profits comma8. @70 assets comma8. @82 marketval comma6.;
RUN;
This works for every line except for those containing special/international characters. Such as:
94 SociÈtÈ GÈnÈrale France $98.6B $3.3B $1,531.1B $25.8B
These lines trip up at the first currency value (@53 sales comma6.) and a warning is thrown indicating that invalid data was found for that input, and a missing value (.) is assigned.
Playing around with @ pointers and informat w values seems to reveal that the special characters are throwing off the column alignments, is this possible (a special character actually taking up 2 bits/spaces even if it prints as a single character. Is there a simple solution?