BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mandan414
Fluorite | Level 6

Hello,

 

I have a series of dataset like ab2000c, ab2001c, ab2002c, ........ 

To do some analyses I made a macro variable like this:

 

%macro maxyear;

 %do  i = 2000 %to 2002;

proc freq data = ab&ic

......

 

but the above dataset doesn't work. I don't know how to insert the macro variable in the middle of  the dataset name.   

 

Thank you so much in advance for your help,

 

Mandana  

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You need a dot after the end of the macro variable name

 

ab&i.c
--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

You need a dot after the end of the macro variable name

 

ab&i.c
--
Paige Miller
Reeza
Super User
Any reason why you can't combine the data sets and work with them together?
mandan414
Fluorite | Level 6
Hi, I cannot combine the dataset because the records are slightly different between the datasets. .
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
  • 3 replies
  • 2435 views
  • 3 likes
  • 3 in conversation