Hi everyone,
i have below code. where i am performing append and insert on a dataset cls. the program ends with error table damage. Could any one advise how to achieve multiple operation on a common dataset at a sametime with multiple users/jobs. Thanks in advance!!
code:
user1 submit :
libname abc "c:\temp" ;
data abc.cls;
set sashelp.class;
run;
options mprint mlogic symbolgen;
%macro loop;
%do i=1 %to 1000;
proc append base=abc.cls data=sashelp.class force;
run;
%end;
%mend;
%loop;
user2 submit:
libname abc2 "c:\temp";
%macro loop;
%do i=1 %to 1000;
proc sql noprint;
insert into abc2.cls set name="subbu",sex='M',age=29 ,weight=. , height=.;
quit;
%end;
%mend;
%loop;
SAS datasets are not designed to be updated simultaneously by different users using the default SAS library engine. You could try the the FILELOCKWAIT option on your LIBNAME statement to see if that helps. As long as each update is quick then you may find this option works reliably. If not then a couple of other options are to use SAS/SHARE (available as a separate product) or to load the dataset into a relational database which will handle the multi-user updating automatically.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: