06-27-2011 03:09 PM
I have a number of DIS jobs that are scheduled through Windows Scheduler and like to capture log files names (that are created under ..Lev1\SASApp\BatchServer\Logs directory) corresponding to each job into a table. Is there a method available that I can use at the end o the job to capture that? I am thinking of putting something in the 'Status Handling' part of the scheduled job.
Any help is appreciated.
06-28-2011 02:59 AM
As much as I know "Status Handling / send job status" doesn't add the log name to the status table. I believe you would have to implement this by yourself (i.e. create a job_status macro in an autocall library and then call this macro in the post-processing of the job). The DIS generated %etls_sendJobStatus() should give you a good starting point for such a macro.
How are the log names created? Are you passing them as parameter when scheduling the jobs?
Not sure in the moment how to retrieve the log name during batch execution - but I'm sure we can find out if you want to go down this path.
06-29-2011 09:35 AM
I am interested in capturing the log file name created by the SAS at run time. I have a macro in place that is called in Job Status Handling > Condition > Custom. This captures the rc values from job and transformation and populates a record in my Oracle table.
What I like to do is also capture the lof file name and insert into a column for each job run. I am wondering if there is any run-time variable that keeps the log file information I can use to do the intended task.
07-13-2011 05:26 PM
One way to try is to use the LOG option that will provide the name of the log file, which wont work if you are running interactively. You can also specify the ALTLOG option if that helps.