DATA HypTabs.Vitals (LABEL = "Vital Signs");
ATTRIB SSN LABEL = 'Social Security Number'
VisitDt LABEL = 'Visit Date' FORMAT = DATE9.
HtIn LABEL = 'Height (In)' LENGTH = 8.
WtLb LABEL = 'Weight (Lb)' LENGTH = 8.
SBP LABEL = 'Systolic BP (mmHg)' LENGTH = 8.
DBP LABEL = 'Diastolic BP (mmHg)' LENGTH = 8.;
KEEP SSN VisitDt HtIn WtLb SBP DBP;
SET WORK.Vitals_IA
WORK.Vitals_MS
WORK.Vitals_UT2;
RUN;
PROC SORT DATA = HypTabs.vitals;
BY SSN VisitDt HtIn WtLb SBP DBP;
RUN;
PROC CONTENTS DATA = HypTabs.Vitals VARNUM;
RUN;
PROC PRINT DATA = HypTabs.Vitals (OBS = 1);
RUN;
When I enter in the code above, I get several errors saying that a lock is not available for the data set. I'm not quite sure what this error message is telling me and I am also not sure how to fix it as it shows up after every single run statement.
Please show the entire log.
Table HypTabs.Vitals must be locked by another process (like another EG session having the table open).
Below two procedures require only read access to the table. Can you execute these two (without executing the code before)?
PROC CONTENTS DATA = HypTabs.Vitals VARNUM;
RUN;
PROC PRINT DATA = HypTabs.Vitals (OBS = 1);
RUN;
If you can't then some other process must be locking the table in write access. If you can then there must be another process locking the table with read access.
If the data is stored in a shared location and another programmer is working on the same project, they might have had the data open at the same time as you.
Is it reported as "locked by another process", or "locked by you in environment ..."?
Please post the whole log of all these steps.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.