The use of a tilde as a diacritical is most often seen in Spanish, and these names seem to have a Spanish origin. Unfortunately, when it was first developed, the IBM standard character set did not include many of the accents used in other languages, and it is only the extended character sets where you will find these available for users.
Word generally renders the extended character sets correctly, but a lot of simpler packages do not. I have no idea where you "extract the dataset" to, but I suspect it is a limitation of that package, and not of SAS.
If the issue is with SAS then look at the National Language setting of your SAS session.
Kind regards
David