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

Capture log file name in monitoring process:

Posts: 38

Capture log file name in monitoring process:

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.


Respected Advisor
Posts: 4,665

Capture log file name in monitoring process:


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.



Posts: 38

Capture log file name in monitoring process:

Thanks Patrick,

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.



SAS Employee
Posts: 41

Capture log file name in monitoring process:

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. 

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation