BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

Hi all,

 

Today, when running the code on SAS Base 9.4, I got this error, could you please help me to identify what it is and how to overcome it

443  /* Add one-day-ahead eta */
444  options mergenoby=nowarn;
445  data previous_replace/view=previous_replace;
446      merge previous_replace previous_replace
447      (firstobs=2 keep=eta rename=(eta=eta_lead1));
448  run;

ERROR: UPDATE views are not supported.
NOTE: View not saved due to errors.

Warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

You can't have view and dataset the SAME name .

 

data previous_replace;
 set sashelp.class;
run;



options mergenoby=nowarn;
  data previous_replace_view /view=previous_replace_view ;
      merge previous_replace previous_replace
      (firstobs=2 keep=age rename=(age=eta_lead1));
  run;

View solution in original post

5 REPLIES 5
Shmuel
Garnet | Level 18

What data type is previous_replace ? is it DATA or VIEW ?

If it is VIEW then the message clarifies itself: 

ERROR: UPDATE views are not supported.

A view holds the code, not the data, so it may be used as input only.

 

If previous_replace was DATA type then your code would work without error.

Phil_NZ
Barite | Level 11

Hi @Shmuel 

 

The previous_place dataset on the merge line is a dataset. And I try to create a view previous_place  by merging two datasets previous_place on merge statement.

 

Warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
Shmuel
Garnet | Level 18

suppose mylib.table is a view and a data at same time.

doing SET mylib.table - which one would sas read?

 

You can't save a view in same the name as existing data. 

 

Ksharp
Super User

You can't have view and dataset the SAME name .

 

data previous_replace;
 set sashelp.class;
run;



options mergenoby=nowarn;
  data previous_replace_view /view=previous_replace_view ;
      merge previous_replace previous_replace
      (firstobs=2 keep=age rename=(age=eta_lead1));
  run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 5 replies
  • 2290 views
  • 5 likes
  • 4 in conversation