BookmarkSubscribeRSS Feed
kyle_fredette
Calcite | Level 5

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?

Thanks!

Kyle Fredette

8 REPLIES 8
SASKiwi
PROC Star

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.

kyle_fredette
Calcite | Level 5

Thanks for the response! I'm actually using the GUI interface. I assume that makes a difference.

morgalr
Obsidian | Level 7

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:

echo on

"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.

kyle_fredette
Calcite | Level 5

@morgalr I am using the SAS EG interface. Does this change what you have written above? We have been running the batch file successfully, but not receiving any results. thanks!

jakarman
Barite | Level 11

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..

---->-- ja karman --<-----
jakarman
Barite | Level 11

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. 

---->-- ja karman --<-----
Doc_Duke
Rhodochrosite | Level 12

Kyle,

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.

Sonywell
Fluorite | Level 6

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.

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!

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
  • 8 replies
  • 2594 views
  • 2 likes
  • 6 in conversation