SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

about Automating SAS using VBScript and task scheduler problem

Reply
Regular Contributor
Posts: 171

about Automating SAS using VBScript and task scheduler problem

Hi All,

 

    I automated SAS Enterprise Guide program by generating a VBScript and scheduled it with the task scheduler. This automated task should run daily, but somehow the task seems not stable. Most of the time it ran, sometimes (some random day, happen once a week or every two weeks randomly) it did not. I could not figure out the reason for it.

   The details:

   1) I am using SAS server on Linux;

   2) I used the windows task scheduler to schedule to VBScript at daily frequency.

   3) In the SAS Enterprise code, I need to access data at SQL server and output the final table to SQL server.

   4) even sometime the SAS code did not run, the task schedule still shows the task run successfully. See the attachement (today the code did not run, but the task still show it runs successfully).

 

    SSo what's the possible reason for that? SAS to SQL connnection is not stable?

 

Thanks,

Jade

  

 


Task_scheduler.PNG
Super User
Posts: 11,343

Re: about Automating SAS using VBScript and task scheduler problem

I suspect the Task Scheduler reports "success" if it was able to send the appropriate start commands and not get an immediate error: ie SAS started.

 

What to the SAS logs of the incomplet runs show? I would look for messages about unable to access/connect or set not available.

 

Once upon a time we had issues with Windows services getting interrupted and not restarting, so the SQL Server side may have an issue similar to that.

 

If you can't find logs or have suppressed them for some reason I suggest making sure that each time the process runs it creates a log. At least you could indentify connection issues and diagnose other SAS specific issues.

Regular Contributor
Posts: 171

Re: about Automating SAS using VBScript and task scheduler problem

Thank you! @ballardw

 

There is no error message in the SAS log file as the SAS program did not run at all.

It seems the Task Scheduler ran successfully but the SAS code is not triggered at all. So strange, I could not figure out the reason for that.

 

Thanks,

Jade

Super User
Posts: 11,343

Re: about Automating SAS using VBScript and task scheduler problem

You may want to try posting the resolved command line that should be sent to SAS to start your job.

 

You may be missing an element. Compare to the command string properties of a SAS launching shortcut for starters. Look in the online documentation for Batch jobs for other hints. 

 

If your SAS install is a server version then you may need additional bits to connect to the server (not sure what they may be because I don't work in server environment) and use the correct scheduler.

 

Ask a Question
Discussion stats
  • 3 replies
  • 157 views
  • 0 likes
  • 2 in conversation