BookmarkSubscribeRSS Feed
jdveerapaneni
Calcite | Level 5

We have different process flows which will update the same dataset at the end of the each code .Some of these processes are overlapping with their run time and causing Lock Issues on dataset which is causing to fail the job.We have SAS/SHARE.I tried to use Modify ,set, Proc sql but nothing worked .Please let me know how this can work with out locking.

 

ex:  code1:

Option DLCREATEDIR;
LIBNAME myshr_a BASE "/tmp/" ;
LIBNAME myshr_b REMOTE HOSTNAME="xxxxx" Server=__1111 slibref=myshr_a USER="&sysuid." PASSWORD="&syspass." ;

%let r=xxxx;
proc operate id=r.__1111 user="&sysuid." pass="&syspass.";
display library _all_; run;

libname myshr_r list ;


data myshr_b.sample;
modify myshr_b.sample(where =(table_id="abcd" and field_name="sam1" and table_update_dt=today()));
x=1234567;
y= 7654321 ;

replace;
run;

 

code2 :

data myshr_b.sample;
modify myshr_b.sample(where =(table_id="bcde" and field_name="sam2" and table_update_dt=today()));
x=1234567;
y= 7654321 ;

replace;
run;

 

both code1 and code2 runs at same time .sample dataset should be modified by both codes without Locking.

2 REPLIES 2
Tom
Super User Tom
Super User

Do you have an index defined for those three variables?

Without that the WHERE clause will need to access every observation sequentially to check if the WHERE condition is met.  It might be that with an INDEX it can skip trying to read observations that do not meet the where condition.

jdveerapaneni
Calcite | Level 5

Yes with INDEX it worked.Thanks so much 🙂

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 740 views
  • 0 likes
  • 2 in conversation