BookmarkSubscribeRSS Feed
Aki1405
Calcite | Level 5

The new management of a local hotel decided to update their recently acquired (and very outdated) property by installing wireless Internet service for their guests. They are also considering updating their billing system because the method used by the previous owner seems faulty. In order to conduct a billing analysis, they would like some calculations about the guests who stayed with them during the first part of February (this was the first month after the change of ownership). The raw data file Hotel.dat contains variables with information on room number, number of guests, check-in month, day, year, check-out month, day, year, use of wireless Internet service, number of days of Internet use, room type, and room rate.

a) Examine the raw data file Hotel.dat and read it into SAS. Next, create date variables for the
check-in and check-out dates, and format them to display as readable dates.

b) Create a variable that calculates the subtotal as the room rate times the number of days in the stay, plus a per person rate ($10 per day for each person beyond one guest, for example for
3 guests, the total per person rate will be (3-1)*10=$20), plus an Internet service fee ($9.95
for a one-time activation and $4.95 per day of use).

c)Create a variable that calculates the grand total as the subtotal plus sales tax at 7.75%. The
result should be rounded to two decimal places.

2 REPLIES 2
ChrisHemedinger
Community Manager

This looks a lot like a homework assignment. And you didn't provide the data for anyone to provide help.

 

Best if you show what you've tried, where you might have got stuck, and of course -- please include the data!

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
sbxkoenk
SAS Super FREQ

Hello,

 

The raw data file Hotel.dat ...

You should start with importing that data into SAS.

But a .dat extension is very generic. It tells us nothing about the way the file is constructed. 

I guess it's just plain text here.
If it's plain text, then import with PROC IMPORT or a data step with INFILE (the latter option is probably the best).

Kind regards,
Koen

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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