SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
KermitTheFrog
Fluorite | Level 6

I have an Export Step in my SAS EG Project to create a .csv file in a Network location. 

When triggering the job manually it works perfectly fine.

 

I am trying to set up an automated job instead of running it manually using the Scheduler (i.e. using a vbscript).

However, I get the following error: 

 

The open data operation failed. The following error occurred.
Could not find a part of the path 'F:\path\to\my\file.csv'.

The F: drive is a network drive. It could most likely be that the F: is not accessible in the session context started by the vbscript and that it is accessible in the normal interactive one (when I trigger it manually).

Therefore, my question is: Is there a way to map the F: drive in the vbscript ? Obviously, if a better solution than tweaking the vbscript exist, I will be more than happy to hear it. 

 

2 REPLIES 2
LinusH
Tourmaline | Level 20

Could it be that the scheduled task is executed by the local system account?

If so, it probably doesn't have access to shared drives.

Also, if you run as an authorized user, try to use UNC paths instead of mapped letters ("F:"), since the drive mappings doesn't always happens when your run tasks in "background mode".

Data never sleeps
KermitTheFrog
Fluorite | Level 6

@LinusH Thank you for the prompt answer.

 

Yes I was thinking using UNC paths instead of the mapped ones. However, when creating the Export Step in SAS EG, I have to select it manually and I was not able to use the UNC path (Step 4 out of 5 of the Export Step in SAS EG: Specify the location and name for the output file).

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 634 views
  • 0 likes
  • 2 in conversation