BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mario1ghz
Calcite | Level 5

Hi,

I can't see server's network device on "Browse" button when I try to create a new "external file".

Can anyone helps me?

Thank

1 ACCEPTED SOLUTION

Accepted Solutions
mario1ghz
Calcite | Level 5

OK,

I never can see network device mapped,  But I can use the phisical network path:

\\<nome:server>\<path in the server>\nome_file.csv

It works.

Thanks,

Mario

View solution in original post

5 REPLIES 5
Patrick
Opal | Level 21

Don't forget that this must run on the SAS server not your workstation. So any mapping used must be on the server. You normally need to use UNC paths.

mario1ghz
Calcite | Level 5

On server explorer I can see Phisical drive A: C: 😧 and network location: B: U: L: that I already mapped.

From Data Integration Studio Browse I can see only the phisical ones.

Patrick
Opal | Level 21

Currently I don't have access to an environment to replicate what you describe so I can't give you a advise for your concrete question.

The approach I'm usually taking is to define the "root" UNC path as macro variable in an autoexec set up for DI jobs. Then I use this macro variable as part of the file path in the external file definition.

I make always sure that the application specific folder structures are the same in all environments so that I can migrate DI jobs between environments without any changes. I need only to populate the macro vars in the autoexec with different UNC paths.

So a filename used in the external file could look like:

&root_path1\folder1\external_file.csv

And then make sure that you also select "double quotes" for the filename.

The only disadvantage to this approach is that when you click on the external file metadata object you can't access the underlying data as there the macro variable doesn't get resolved. I couldn't figure out yet (and haven't also invested too much time with it) if there would be a way to define the macro variable also somewhere else so that the pathname gets always resolved.

I believe the advantage of this approach is that you don't need to map network drives on the server. In my experience mapping networks on the server is something the server admins in a lot of organisations are very resistant to do.

Scott_Mitchell
Quartz | Level 8

You can use the following code to map a network drive to the SAS Server.  \\READYSHARE\USB_Storage is the UNC path you wish to map to t:\.

DATA _NULL_;

X 'NET USE T: \\READYSHARE\USB_STORAGE';

RUN;

If you want to know more then check out How to Map Network Drives From the Command Prompt in Windows.

mario1ghz
Calcite | Level 5

OK,

I never can see network device mapped,  But I can use the phisical network path:

\\<nome:server>\<path in the server>\nome_file.csv

It works.

Thanks,

Mario

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 6490 views
  • 0 likes
  • 3 in conversation