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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 490 views
  • 2 likes
  • 3 in conversation