BookmarkSubscribeRSS Feed
JaySwan
Calcite | Level 5

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

2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12

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

Tom
Super User Tom
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 747 views
  • 0 likes
  • 3 in conversation