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.
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.
Yes with INDEX it worked.Thanks so much 🙂
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.