EG: SAS Enterprise Guide 4.1 (4.1.0.1019)
I need to read in *.pdf file names off of our corporate share drives from EG / UNIX and create a SAS Dataset with the names.
The mapped share I need to connect to from EG has this type of string when mapped: abcdefghij on 'Shared File Server (AAAAA-bbb-999)' (That is how it looks mapped to my B: Drive)
There is a folder structure under that that looks like ... B:\Level1\Level2\Level3\*.pdf
Below code is what I have for PC SAS where I have access to the Mapped Drive (B:) and it works perfect.
I need to connect to the Share Drive and be able to do the same from EG running on the UNIX box..
Below Works Fine:
%let dirname = B:\scorecards\12-2011_Data\Scorecards_Dec11_Data_V1;
filename DIRLIST pipe "dir /B &dirname\*.pdf";
data dirlist ;
length fname $256;
infile dirlist length=reclen ;
input fname $varying256. reclen ;
run;
When I run the above code on EG I get a DirList SAS DataSet with the following value in the fname field: /bin/ksh: dir: not found
Any ideas?
TIA, J
Jay,
EGuide is running on your PC, but your SAS server is in the Unix environment. You need to rewrite the dirname to follow Unix conventions (not the PC-mapped drive letter) and change the 'dir' to an "ls" (also to follow the Unix conventions).
Doc Muhlbaier
Duke
If B: is mapped to "abcdefghij on 'Shared File Server (AAAAA-bbb-999)"
Then from the PC you should be able to refer to it as \\AAAAA-bbb-999\abcdefhij\ instead of B:\.
But from you Unix server there is probably a mount point that would make this visable from the Unix processes. They might have mounted as something like /net/AAAAA-bbb-999/abcdefghij/ , but you need to check with the Unix admin to see exactly how to find the same data.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.