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.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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