Naga Vemprala
Naga Vemprala

Reputation: 728

SAS EG: SAS Dataset is locked by opening it from EG. Need a resolution

One of the critical SAS dataset is left open from SAS Enterprise Guide, by our offshore associate. We are depending on that dataset for many updates through various jobs. I tried searching for an option from various sites to unlock the dataset, but of no use. Kindly provide any suggestion. Thanks.

Upvotes: 0

Views: 1438

Answers (3)

Naga Vemprala
Naga Vemprala

Reputation: 728

There is an option in SAS Enterprise Guide. Under Tools --> Options --> Data --> Performance. There is a check box, "Close Data Grid after period of inactivity (in minutes)" This was even if the data grid is opened after 'n' minutes, it will be available for others to update.

Upvotes: 0

Tim Sands
Tim Sands

Reputation: 1068

Depending on some of the specifics of your situation, another option is to prevent anyone from locking it in the first place using a PW= dataset option like:

data myImportantTable(PW=pass123);
    x=1;output;
run;

Then you could create a view that allows EG users to click and see the underlying data, but does not LOCK the original dataset:

proc sql; 
    CREATE VIEW myImportantTable_view AS
    SELECT * FROM myImportantTable(read=pass123)
;quit;

Now INSERTS, UPDATES etc will work even if the view is opened by a user in EG:

*This will work even if view is opened in EG;
proc sql;
    INSERT INTO myImportantTable(PW=pass123) VALUES(101)
;quit;

Note that this is not a good option if you've got a lot of different INSERT/UPDATE statements spread throughout your program - each of them would need the (PW=...) dataset option added to them in order to work.

Upvotes: 1

Jay Corbett
Jay Corbett

Reputation: 28411

Use the SYSTASK command to execute a mv (move) or cp (copy) UNIX command to replace the existing data set. If you need to move or copy more than one data set at a time you can use the * wildcard but you must also use the SHELL option.

Upvotes: 0

Related Questions