BookmarkSubscribeRSS Feed
dav_amol
Calcite | Level 5
Hi,
I am writing a macro which will try to lock the dataset using LOCK DS_name command. If due to contention the Lock fails then we need to trigger an email which will contain details about the user/process holding the lock on given table. By using LOCK DS_name LIST we can know this but these details from LOCK LIST get written into Log file. Is there any way to redirect output of this command to some dataset which we can use for sending an email.

Regards,
Amol Deshmukh
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
SAS 9.2 discussion should lend some guidance. You can use a macro to interrogate the LOCK return code, and then decide what course to take regarding an EMAIL, with condition %IF %THEN %DO / %END code.


Scott Barry
SBBWorks, Inc.

SAS/Share 9.2 DOC: Locking Objects Explicitly (LOCK Statement)
http://support.sas.com/documentation/cdl/en/shrref/59595/HTML/default/a000203048.htm
deleted_user
Not applicable
have a look at ROC PRINTTO.
That will redirect the log to a file from which you can read the messages.

good luck

PeterC

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 785 views
  • 0 likes
  • 3 in conversation