BookmarkSubscribeRSS Feed
walkerel
Calcite | Level 5
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.

4 REPLIES 4
r_behata
Barite | Level 11

Please show the entire log.

Patrick
Opal | Level 21

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.

jvdl
Obsidian | Level 7

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.

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 4 replies
  • 6128 views
  • 0 likes
  • 5 in conversation