I'm a base SAS user but getting into SAS Viya. One thing I do frequently in base SAS is inventory files on the local network or my C drive as shown below:
filename pipedir pipe %sysfunc(quote( dir "C:\TEMP" /S )) lrecl=1000; data indata; infile pipedir truncover; input line $char1000.; run;
It returns raw information about the folder path, the contents of the folder, the subfolder paths and subfolder contents. Each file includes date/time modified, and file size in addition to the filenames. I can parse and combine the raw data to get exactly what I need which I then use to find new files and import them automatically.
However, when I run similar code in SAS Viya using an NFS mounted drive I only get the filenames for the immediate folder. No subfolders and none of the other information. This is useful enough for most purposes but not including the subfolders is going to be a problem. Does anyone know how to get the kind of information I get using my PC SAS version when using SAS Viya for a mounted drive? Because SAS Viya exists on a Linux server are there some Linux commands that can be run from my SAS code that give me what I need?
... View more