BookmarkSubscribeRSS Feed
blindgaurdien16
Fluorite | Level 6

Hi All,

We have a requirement to create a Audit log table, to capture the following details

1) JobId

2) JobName

3) StartTime

4) EndTime

5) Status

This basically is used to capture details of the the current Job, so that this can be used

to track details about the Job at all times.

Regards

Prakash Ramesh

2 REPLIES 2
milts
Pyrite | Level 9

Hi,

If I am correct the first four has an corresponding automatic variable on a DI.

JobId - jobID

JobName - etls_jobName

For the StartTime and EndTime, you can probably use the date time function. Update start time on the pre-process and update end time on the post process.

For the Status, you can update your audit table on the post-process code and check the &syserr or &sysrc value. This is a little tricky since if you get some errors, job might abort and it might not reach the portion of the post-process.

Hope this helps.

shivas
Pyrite | Level 9

Hi Ramesh,

Try using Status handling to get all this information and capture this information in dataset.you will get

Job End Time

Job Start Time

Job Return Code

Job Name

Job Status and many more.Hope this helps..

Thanks,

Shiva

Status.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1351 views
  • 0 likes
  • 3 in conversation