Hi All,
When I am running below peice of code, I am getting error message :
/****Code *****/
%put %str(NOTE: Creating indexes in Parallel...);
proc datasets lib = VL00 nolist;
modify VL0004_005D_Employee_Sensitive (asyncindex=YES);
index create VL0004_004D_Employee_Sk ;
index create Employee_Id ;
index create Person_Id ;
quit;
/*****Log ********/
MPRINT(ETLS_LOADER): ;
NOTE: Creating indexes in Parallel...
MPRINT(ETLS_LOADER): proc datasets lib = VL00 nolist;
MPRINT(ETLS_LOADER): modify VL0004_005D_Employee_Sensitive (asyncindex=YES);
MPRINT(ETLS_LOADER): index create VL0004_004D_Employee_Sk ;
NOTE: Because ASYNC operations create indexes in parallel, the status for all defined indexes will be determined at closing time.
NOTE: Simple index VL0004_004D_Employee_Sk has been defined.
MPRINT(ETLS_LOADER): index create Employee_Id ;
ERROR: Specified resource already exists.
MPRINT(ETLS_LOADER): index create Person_Id ;
MPRINT(ETLS_LOADER): quit;
NOTE: Statements not processed because of errors noted above.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.
NOTE: PROCEDURE DATASETS used (Total process time):
real time 1.55 seconds
cpu time 0.00 seconds
It might be a long shot, but if the sas table currently exists (from a previous try) then it'll need deleting before running the code again.
In the code, every time I am dropping the table first and then recreating it. And then i am trying to create indexes. The same code is working perfectly fine in production environment but not in testing environment.
Please try this code
%put %str(NOTE: Creating indexes in Parallel...);
proc datasets lib = VL00 nolist;
modify VL0004_005D_Employee_Sensitive (asyncindex=YES);
index delete VL0004_004D_Employee_Sk ;
index delete Employee_Id ;
index delete Person_Id ;
index create VL0004_004D_Employee_Sk ;
index create Employee_Id ;
index create Person_Id ;
quit;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.