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
Rhodochrosite | Level 12

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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 295 views
  • 0 likes
  • 3 in conversation