05-10-2016 06:39 PM - edited 05-10-2016 06:55 PM
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).
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?
05-11-2016 05:29 AM
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.