GOAL:
- read file names including full path using SAS from DOS directories (and their subdirectories) and store them in a database
- Umlauts are allowed (ä,ê,ö,ü,ß etc…)
- I need the full path in some way (file names only won’t do, this is not the problem).
PROBLEM
a) when file or folder names contain umlauts the recorded names do not equal the real file names
b) even the same umlauts (see picture “ü”) are sometimes displayed differently.
Files in Explorer and in SAS-Output
This is my last attempt, using SAS to create the dirrectory listing and to import it directly in SAS.
SAS-CODE
filename DIRLIST pipe "dir C:Z_BackupLwXSASFilingListUMLAUTE /s";
DATA database ;
length RawOutput $256 ;
infile dirlist length=reclen;
input RawOutput $varying256. reclen ;
RUN;
PROC PRINT; RUN;
It does not matter, if I create the listing directly in the console and import the rcreated text-file or if I do all in SAS.
New contributor
Lub Ben Ja is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.