BookmarkSubscribeRSS Feed
leslie
Calcite | Level 5

Need help with arrays and do loops with character and numeric variables

please provide guidance using sas 9.3

4 REPLIES 4
art297
Opal | Level 21

What does your data look like?  What are you trying to do?  What have you tried thus far?

leslie
Calcite | Level 5

It is a combination of character variable with numbers (if it is between 370000 and 390000 then it is X

If it is between 200000 - 30000 then it is Y.

I have tried ARRAY and the DO loop =

i have read through the documentation you all post here and on the sas site and cannot figure out what i am doing wrong;

art297
Opal | Level 21

We (everyone on the forum) will need a sample dataset, in the form of a datastep, including the variable you are trying to create.

leslie
Calcite | Level 5

unfortunately i cannot provide that = but could you point me in the direction of the correct sas documentation so i can look there for helpful hints? thanks -

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 494 views
  • 0 likes
  • 2 in conversation