BookmarkSubscribeRSS Feed
sas_it
Quartz | Level 8

if we have imported the data from excel and if we want to use arrays. For example, we are having the fields like emp_id, emp_name, emp_sal in the imported data. How to use arrays?

1 REPLY 1
Astounding
PROC Star

Without knowing what you are trying to accomplish, you can't get specific suggestions.  Here are a few general guidelines:

 

  • Arrays don't care where the data came from, whether it is Excel or any other source.  They only care about what is in your SAS data set.
  • Anything you can do with arrays you can do without arrays.  Arrays don't add any functionality at all, only a short cut (in some cases) for writing the program.
  • An array can contain only one type of variable (character or numeric).  It looks like you have both (emp_sal would be numeric, and emp_name would be character).  So you will need at least two arrays.

For more guidance, you need to supply more information about your objectives.

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 721 views
  • 0 likes
  • 2 in conversation