07-23-2015 03:12 PM
I am trying to kick off a SAS project using the GUI generated SAS code. I keep getting an error regarding my export step in the process, which prevents the query from being run. Is there a way to kick off the scheduling code and still maintain the export step?
07-23-2015 04:19 PM
So you are scheduling a SAS program, not an EG project? If so please post the SAS log of your export step including errors. If the SAS code can be run without errors manually then there is no reason why running via scheduling should be an issue as long as it is scheduled using the same environment.
07-23-2015 04:38 PM
If you have a full working SAS program, you can "easily schedule it" thought the Windows scheduler by making a small batch file to launch it. In the batch file you need to put your fully qualified path to your SAS executable (the SAS program) followed by your fully qualified path to your SAS configuration file followed by the option "-sysin" and then followed by your fully qualified path to your SAS program.
here is a small example of the batch file:
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\SASV9.CFG" -sysin "C:\Users\myID\Documents\My SAS Files\9.2\someFolder\mySASFile.sas"
Note: in the example the quotes are necessary for windows to understand the path due to spaces.
Once you have that, run the batch file to make sure it works, then use the Windows scheduler to setup the schedule for the run. Good luck, I use this a lot to schedule large jobs that take multiple hours to run so I don't have to be there to launch them.
07-24-2015 02:46 AM
When you are using Eguide and have embedded tasks that rely on the Eguide own local interfaces to Windows (import/export) you have an issue as they cannot be exported as to be run as independent SAS code. Scheduling is based on sas-steps that can be run on their own. Not terminal no keyboard no desktop interfaces..
07-24-2015 10:51 AM
The gui interface in EGuide will create a VBS script that will call the sas code. Basically it will try to schedule thing in the windows scheduler. The windows scheduler is often closed by desktop-admins. The response I made is that the Eguide program and project does have options (import send-to) that cannot be used to be transformed in a batch approach. The problem is your are using the graphical part of EGuide and not aware of those limitations.
07-24-2015 12:46 PM
To follow-up on Jaap's comments, I use the EGuide GUI to schedule an EGuide Project (or Process Flow) and it successfully does exports and (SMTP) e-mails. If that is what you are doing, it may be the configuration that IT has set your PC to that is causing the problem.
07-27-2015 10:00 PM
I'll assume that you are scheduling through the Windows Task scheduler with your SAS EG project.
I would suggest first verifying that the export works without issue when you run the project from Enterprise Guide. I'll assume you've already done that. In that case, make sure that you are using the 'Export as a Step in the project' option to create your export task in EG. I imagine you have already done this as well.
So, If this is already the case, and you are having success executing the VBS scheduled script but are receiving an error on that particular portion of the project, look closely to see if that error may be caused by the scheduled processes inability to access the drive location you specified in the export. For example, If you run the scheduled task while you are not logged in to the machine, it is likely that file server drives are not accessible to the process. In many cases, these drives are only available when you are logged in and recognized by Windows Directory services. If the scheduled process is running as you, with a stored password, it is also possible that the drives themselves are not mapped to drive letters and are therefore inaccessible. Often, organizations map drive letters to file servers using a batch script when you log in to windows. This same thing doesn't happen when the Windows Task Scheduler logs in as you to execute a task.