BookmarkSubscribeRSS Feed
Goose306
Fluorite | Level 6

Hi all,

 

I have a process I'm attempting to schedule that runs daily. Files are pulled, queries are done, and then files are shipped off to seperate Excel files and dumped on a server. The end result should be 6 different Excel files. The process to run this was built off using the automated option in the File Menu. I've made some adjustments to the VBScript, but it was all on the front-end, as it does some file maintenance before calling SAS (moving out the prior day files into an archive and preparing for the next batch).

  • 4 of the 6 files build correctly, but 2 do not. If I run the Process Flow directly in SAS, it does work, but it does not work when done via the automated method. The export options are saved as Step-In Exports.
  • The 2 that do not are exports of tables directly to Excel, with no queries or filters beforehand. These tables aren't particularly large, each being <10,000 rows. These are the only two that do not have queries prior to export, so I assume it may be related, but this may be correlation rather than causation.

 

When I open EG and check the logs the message displayed is "Export job: Unexpected error accessing source data." which is somewhat less than useful. I've done some cursory searches and the only information that comes up is for a similarly-wordered error related to issues accessing metadata, which doesn't seem to be this issue. I have changed the options in Task Manager to ensure it is using cscript from sysWOW64, being as I'm on x64 Windows 7 and SAS is 32-bit (I'm on EG 7.1)

 

Any help would be appreciated. I have a hunch it may be attempting to run the Export before it is able to connect to the server and retrieve the table, thus causing the error (which may also explain why the others do not have the error, given they have queries before the export) but I could be off base here. If it is related ot this, is there a way to make sure that SAS gives itself time to connect to the source before attempting to run the export?

 

EDIT: I added an interim step which just made a new table by duplicating the fields from the prior table (no actual query) and it ran fine. Any ideas here?

1 REPLY 1
arodriguez
Lapis Lazuli | Level 10

Hi,

 

I have also use VBS sometimes to work with excel. I don't now if its the same problem, but in my case, I try to acces a file before that Excel process it. To solve this I use the function sleep() that make that sas wait a determinet number of time.

 

Also I use sleep in a do bucle until the file is editable when is related to a file, making that SAS wait until file could be edited (not in used by other program).

 

I hope that this could hep you.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1980 views
  • 0 likes
  • 2 in conversation