BookmarkSubscribeRSS Feed
aalyoseef
Calcite | Level 5

Provide a list of all customers by name, the customer’s street address, the customer’s city/state/zip code
(concatenated into a single field such as Radford, VA 24142 – do not show the last 4 digits of the zip code and
make sure that any extra spaces are eliminated) as Address, the customer’s phone number, the name of the pet
and the pet’s date of birth for all animals who are not current on their vaccinations (do not show the vaccination
field in your results).

2 REPLIES 2
ballardw
Super User

Example data, some values, variable names, something to work with. Approach makes a big difference on what you have.

 

And what have you tried?

andreas_lds
Jade | Level 19

Hardly possible to suggest something useful without seeing the data you have and what you already tried.

Some hints:

  • to control which variable is written to a dataset, use keep OR drop statement
  • alphanumeric variables are always padded with blanks to fill the length, so "make sure that any extra spaces are eliminated" could be a challange
  • the if-statement is used to decide which observation to write to a dataset

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1027 views
  • 0 likes
  • 3 in conversation