BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BenConner
Pyrite | Level 9

Hi,

 

I need to serialize update access to a SAS dataset across a series of concurrent jobs. Each one only requires exclusive access for a few seconds but Murphy arranged for two to need it at the same time this morning.  One failed.

 

I thought the lock statement might work but there isn't a wait option for it.  So I hoped there was a lock function but couldn't find one.  That would be handy in a data step.

 

So how has this been done in the past?

 

Thanks!

 

--Ben

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
Kurt_Bremser
Super User

You can code a loop for the LOCK statement that continues with WAITing steps in between until it gets a zero return code in macro variable SYSLCKRC.

BenConner
Pyrite | Level 9

Thanks, Kurt.  That could work.  Will work out the details.  If push comes to shove I can always use a semaphore file.  Was just trying to avoid that.

 

--Ben

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 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
  • 466 views
  • 0 likes
  • 2 in conversation