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

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
  • 3 replies
  • 1721 views
  • 3 likes
  • 3 in conversation