BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fighting123
Fluorite | Level 6
PROC IMPORT DATAFILE = 'C:\Users\TSE\s208034\Vegas_edit.xlsx' 
/*read the dataset */
DBMS=XLSX OUT = Vegas_edit REPLACE; 
/* file type extension .xlsx is excel file */
RUN;
PROC PRINT DATA = vegas; /*Print the result*/
TITLE 'vega\';
RUN;
DATA vegas_new;
SET vega;
IF _type ='Couples' THEN DELETE;
PROC PRINT DATA = vegas_new; /*Print the result*/
TITLE 'vegas_new';
RUN;

fighting123_0-1603446353468.png

after input an excel file into sas, i want to subset the observation 'couples' from the data

but why there is  an error that the vegas data didn't not exit

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
fighting123
Fluorite | Level 6

fighting123_0-1603447260495.png

 

Amir
PROC Star

Hi @fighting123 ,

 

It looks like you have specified "vega" (without an "s" on the end). Change this to "vegas" on your set statement and try again.

 

Kind regards,

Amir.

 

andreas_lds
Jade | Level 19

Please post the complete log as text using the "Insert Code" button.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 653 views
  • 2 likes
  • 3 in conversation