BookmarkSubscribeRSS Feed
KyleOB
Calcite | Level 5

Hi,

Excuse me for what might seem like a simple question, but as a beginner, I am not sure how to proceed with a task I have.

I have two Excel files, file X, which contains customer IDs, names, and birthdays, and file Y, which has customer IDs, addresses, and phone numbers.

Would you kindly guide me on how to add the phone number column and its corresponding values from file Y to file X, and output the new X as an Excel file in SAS DIS environment?

The files X and Y will be updated(replaced) every week. I need to run the job every week to get new Xs with IDs, names, birthdays, and phone numbers.

I would greatly appreciate your help. Thank you.

2 REPLIES 2
AhmedAl_Attar
Ammonite | Level 13

Hi @KyleOB ,

Have a look at this blog Using LIBNAME XLSX to read and write Excel files

It should give a starting point

 

Hope this helps

Tom
Super User Tom
Super User

I have no idea how to do it in DIS, but the concept is simple.

 

1) Convert each Excel file into actual SAS datasets so they are useful as data.

2) Merge the two datasets using the common variable CUSTOMER_ID to create a new third dataset.

3) If want to share the data for someone to look at then you can make a report.  It could be PDF file.  Or you could write the data back into an Excel file.

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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