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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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