Hi all,
The dataset i am working contains more than 1lakh observations and 32 columns. Even though i kept only 8 columns for my analysis, every time when i give a simple coding sas is not responding immediately taking nearly 15mins to produce error in log even. Please help what should i do to avoid this..
Thanks
Data file Temp1.Hotel_bookings.data is in a format that is native to another host,or not match the session encoding. Cross environment data access will be used,which might take additional CPU resources and might reduce performance.
I got this message in log when i imported the dataset into sas.
Please post the whole log of the step. To post the log, copy/paste the log text into a window opened with the </> button:
There are additional points of interest. Please also post information about the library where the dataset resides (LIBNAME LIST), and the structure of the dataset (output of PROC CONTENTS).
The CONTENTS Procedure Data Set Name HOTEL.HOTEL_BOOKINGS Observations 119390 Member Type DATA Variables 32 Engine V9 Indexes 0 Created 2020/04/17 11:55:47 Observation Length 240 Last Modified 2020/04/17 11:55:47 Deleted Observations 0 Protection Compressed NO Data Set Type Sorted NO Label Data Representation WINDOWS_64 Encoding shift-jis Japanese (SJIS) Engine/Host Dependent Information Data Set Page Size 65536 Number of Data Set Pages 440 First Data Page 1 Max Obs per Page 272 Obs in First Data Page 253 Number of Data Set Repairs 0 ExtendObsCounter YES Filename C:\Users\Prithi\Downloads\hotel-booking-demand (1)\hotel_bookings.sas7bdat Release Created 9.0401M6 Host Created X64_10HOME Owner Name DESKTOP-QT3GBI8\Prithi File Size 28MB File Size (bytes) 28901376 Alphabetic List of Variables and Attributes # Variable Type Len Format Informat 28 adr Num 8 BEST12. BEST32. 10 adults Num 8 BEST12. BEST32. 24 agent Char 4 $4. $4. 7 arrival_date_day_of_month Num 8 BEST12. BEST32. 5 arrival_date_month Char 4 $4. $4. 6 arrival_date_week_number Num 8 BEST12. BEST32. 4 arrival_date_year Num 8 BEST12. BEST32. 21 assigned_room_type Char 1 $1. $1. 12 babies Num 8 BEST12. BEST32. 22 booking_changes Num 8 BEST12. BEST32. 11 children Num 8 BEST12. BEST32. 25 company Char 4 $4. $4. 14 country Char 3 $3. $3. 27 customer_type Char 9 $9. $9. 26 days_in_waiting_list Num 8 BEST12. BEST32. 23 deposit_type Char 10 $10. $10. 16 distribution_channel Char 9 $9. $9. 1 hotel Char 12 $12. $12. 2 is_canceled Num 8 BEST12. BEST32. 17 is_repeated_guest Num 8 BEST12. BEST32. 3 lead_time Num 8 BEST12. BEST32. 15 market_segment Char 13 $13. $13. 13 meal Char 2 $2. $2. 19 previous_bookings_not_canceled Num 8 BEST12. BEST32. 18 previous_cancellations Num 8 BEST12. BEST32. 29 required_car_parking_spaces Num 8 BEST12. BEST32. 31 reservation_status Char 9 $9. $9. 32 reservation_status_date Num 8 DDMMYY10. DDMMYY10. 20 reserved_room_type Char 1 $1. $1. 9 stays_in_week_nights Num 8 BEST12. BEST32. 8 stays_in_weekend_nights Num 8 BEST12. BEST32. 30 total_of_special_requests Num 8 BEST12. BEST32.
I have created the library called hotel
So the encoding might be an issue here; if you work with another encoding, the transcoding of character values might eat a lot of resources.
Please post the analysis code you run against this dataset, still better, post the complete log of the step that takes so long, once it has finished or ended with an ERROR.
I have tried to use Proc Report to produce the total number of special request given by customers to City Hotel in my dataset. And again sas took nearly 10mins to produce the error message. Whenever i am wrong in coding, sas is not responding quick. Could you identify whats wrong in the encoding? This is my log report.
I am hoping to find a solution for this through this community please!
Thank you
proc report data=hotel.Hotel_bookings; column hotel total_of_special_request; where hotel='City Hotel'and total_of special_request >0; ------------ --------------- 49 22 76 ERROR: Syntax error while parsing WHERE clause. NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended. ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, GE, GT, LE, LT, NE, OR, ^=, |, ||, ~=. ERROR 76-322: Syntax error, statement will be ignored. rbreak after/summarize style=[font_weight=bold]; title'No of special request given to City Hotel'; run; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE REPORT used (Total process time): real time 0.05 seconds cpu time 0.00 seconds
1. The log you are showing show 0 seconds, not 15 minutes
2. No space in variable names please/
where hotel='City Hotel'and total_of special_request >0; ------------ --------------- 49 22 76
No space in variable names. You forgot an _.
Such a basic error. Please be careful to use the correct variable names, end queries with ; , etc..
Thank you for the response. Yes i am new learner to sas. Though the log shows 0 seconds, but sometimes it takes very long time to produce the report. I posted some of the pictures of long cpu time with my early post. This long wait really worried me as currently i am working on my assignment. And now i have started to save the sas files in utf-8 format since morning so i didnt had the trouble after that. Still i am not sure whether i am right. The reason why i posted this issue is i wanted to find out what could be the reason through this community.
Thanks
Are you working over a VPN? SAS itself needed only 0.05 seconds to process the code and issue the messages, so it seems to be your connection to the SAS server that is extremely slow.
Regarding your code: what is total_of? If it is a variable name, it has to be followed by an operator. And always use blanks between the elements of a statement, the AND immediately following the closing quote causes the first NOTE.
No i am using my home wifi. Here i shared some of the pictures when i imported the dataset. Sorry i took this image in my phone and sharing here. Eventhough the CPU time is showing in seconds but really sas is taking nearly 10mins atleast whenever i give wrong coding.
Please someone help me to get rid of this issue.
Thank you
These screenshots seem to present no interest. You show a libname and a proc print and proc sql.
> Even though i kept only 8 columns for my analysis, every time when i give a simple coding sas is not responding immediately taking nearly 15mins
What's taking 15 minutes? I don't see that you keep 8 columns. I don't see any analysis.
What I see is that you print a report with over 100,000 lines.
Why on earth would you do that?
How many different values for the variable HOTEL are there?
You really need to explain your problem much better.
@Amali6 wrote:
Hi all,
The dataset i am working contains more than 1lakh observations and 32 columns. Even though i kept only 8 columns for my analysis, every time when i give a simple coding sas is not responding immediately taking nearly 15mins to produce error in log even. Please help what should i do to avoid this..
Thanks
Really show the code and errors from the log. Most actual errors will terminate way quicker than that. I suspect that you are actually getting some sort of warnings, and possibly many of them.
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!
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.