BookmarkSubscribeRSS Feed
HannaZhang
Obsidian | Level 7

Hi,all

I want to know how to resume the original view after sashelp.vcolumn rewrited.

I tried like this,but there was error "Could not be built sashelp.vcolumn.view,because sashelp.vcolumn.data is already exists." in the log . 

Thanks

 

proc sql;
create view sashelp.vcolumn as 
select * from DICTIONARY.COLUMNS;
quit;
6 REPLIES 6
HannaZhang
Obsidian | Level 7
But I did update the sashelp.vcolumn by data step.Now the sashelp.vcolumn can not revert the origin version ,which is I am trying to do.
ballardw
Super User

Dictionary.Columns is sashelp.vcolumn

 

 

SASHELP.vcolumn is a data view, not a data set, maintained by SAS. Views have different rules for creation than data sets, one of which is "if it exists you can't overwrite it". And you should not even try with any of the views in SASHELP.

 

HannaZhang
Obsidian | Level 7
Thanks for the reminder,I found a way of reverting the sashelp.vcolumn to the original version.
aditya0907
Calcite | Level 5

Hi, how did you retrieve vcolumn. I've a similar issue where vcolumn got replaced by a dataset !!

Kurt_Bremser
Super User

How could anyone who is not running the SAS install user replace this? The whole installation tree should only be writable by the SAS installation user.

And you NEVER (as in NEVER) run SAS as the installation user.

Since SASHELP.VCOLUMN is a SQL view of DICTIONARY.COLUMNS, you can recreate it like this:

proc sql;
create view vcolumn as select * from dictionary.columns;
quit;

proc compare
  base=sashelp.vcolumn
  compare=vcolumn
;
run;

(I used the PROC COMPARE to prove that it created a correct replica in SAS On Demand).

By creating the view as SASHELP.VCOLUMN (after first removing the erroneous dataset), you should be able to recreate the view.

 

In a default SAS installation, the .sas7bvew file is contained in the

SASFoundation/9.4/sashelp

subdirectory of your SAS installation tree.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1901 views
  • 1 like
  • 4 in conversation